From c572e393e7399d125b543f4102d1baeb3b3b8391 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 18 Sep 2008 18:44:03 +0200 Subject: Remove "category" for buffers (keep only name). --- src/plugins/alias/alias-info.c | 2 +- src/plugins/alias/alias.c | 16 +++++++--------- src/plugins/alias/alias.h | 3 +++ 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'src/plugins/alias') diff --git a/src/plugins/alias/alias-info.c b/src/plugins/alias/alias-info.c index 2a8e7a2e9..a746db33a 100644 --- a/src/plugins/alias/alias-info.c +++ b/src/plugins/alias/alias-info.c @@ -43,7 +43,7 @@ alias_info_get_infolist_cb (void *data, const char *infolist_name, if (!infolist_name || !infolist_name[0]) return NULL; - if (weechat_strcasecmp (infolist_name, "alias") == 0) + if (weechat_strcasecmp (infolist_name, ALIAS_PLUGIN_NAME) == 0) { if (pointer && !alias_valid (pointer)) return NULL; diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index 75768f688..95de45628 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -28,15 +28,13 @@ #include "alias-info.h" -WEECHAT_PLUGIN_NAME("alias"); +WEECHAT_PLUGIN_NAME(ALIAS_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Alias plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); -#define ALIAS_CONFIG_NAME "alias" - struct t_weechat_plugin *weechat_alias_plugin = NULL; struct t_config_file *alias_config_file = NULL; @@ -239,7 +237,7 @@ alias_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, weechat_printf (NULL, _("%s%s: error, circular reference when calling " "alias \"%s\""), - weechat_prefix ("error"), "alias", + weechat_prefix ("error"), ALIAS_PLUGIN_NAME, ptr_alias->name); return WEECHAT_RC_ERROR; } @@ -441,7 +439,7 @@ alias_get_final_command (struct t_alias *alias) weechat_printf (NULL, _("%s%s: error, circular reference when calling " "alias \"%s\""), - weechat_prefix ("error"), "alias", + weechat_prefix ("error"), ALIAS_PLUGIN_NAME, alias->name); return NULL; } @@ -639,7 +637,7 @@ alias_config_create_option (void *data, struct t_config_file *config_file, { weechat_printf (NULL, "%s%s: error creating alias \"%s\" => \"%s\"", - weechat_prefix ("error"), "alias", + weechat_prefix ("error"), ALIAS_PLUGIN_NAME, option_name, value); } @@ -724,7 +722,7 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc, weechat_printf (NULL, _("%s%s: error creating alias \"%s\" " "=> \"%s\""), - weechat_prefix ("error"), "alias", + weechat_prefix ("error"), ALIAS_PLUGIN_NAME, alias_name, argv_eol[2]); return WEECHAT_RC_ERROR; } @@ -904,7 +902,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { weechat_printf (NULL, "%s%s: error creating configuration file", - weechat_prefix("error"), "alias"); + weechat_prefix("error"), ALIAS_PLUGIN_NAME); return WEECHAT_RC_ERROR; } alias_config_read (); @@ -921,7 +919,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) "by user, and $* is replaced by all arguments.\n" "Variables $nick, $channel and $server are " "replaced by current nick/channel/server."), - "%- %h", + "%(alias) %h", &alias_command_cb, NULL); weechat_hook_command ("unalias", N_("remove an alias"), diff --git a/src/plugins/alias/alias.h b/src/plugins/alias/alias.h index 97a348e45..2c8cb1ded 100644 --- a/src/plugins/alias/alias.h +++ b/src/plugins/alias/alias.h @@ -21,6 +21,9 @@ #define __WEECHAT_ALIAS_H 1 #define weechat_plugin weechat_alias_plugin +#define ALIAS_PLUGIN_NAME "alias" + +#define ALIAS_CONFIG_NAME "alias" struct t_alias { -- cgit v1.2.3