diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-08-16 13:54:15 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-08-16 13:54:15 +0000 |
commit | 30c3fa9d987db1059cf90f6a4c52518569788eda (patch) | |
tree | 1977d855bebfc1ccf4485594ba486da1bd56376f /src/plugins/plugins.c | |
parent | 0c8867c9e3aa41c37c4dbb9045b8b6bf3cfa746b (diff) | |
download | weechat-30c3fa9d987db1059cf90f6a4c52518569788eda.zip |
Code cleanup: renamed some constants and variables (prefix added)
Diffstat (limited to 'src/plugins/plugins.c')
-rw-r--r-- | src/plugins/plugins.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index 6e011a08b..e0bfe734c 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -81,10 +81,10 @@ plugin_find_server_channel (char *server, char *channel, /* nothing given => return current server/channel */ if ((!server || !server[0]) && (!channel || !channel[0])) { - (*ptr_server) = SERVER(gui_current_window->buffer); - (*ptr_channel) = (BUFFER_IS_CHANNEL(gui_current_window->buffer) || - BUFFER_IS_PRIVATE(gui_current_window->buffer)) ? - CHANNEL(gui_current_window->buffer) : NULL; + (*ptr_server) = GUI_SERVER(gui_current_window->buffer); + (*ptr_channel) = (GUI_BUFFER_IS_CHANNEL(gui_current_window->buffer) || + GUI_BUFFER_IS_PRIVATE(gui_current_window->buffer)) ? + GUI_CHANNEL(gui_current_window->buffer) : NULL; } else { @@ -96,9 +96,9 @@ plugin_find_server_channel (char *server, char *channel, } else { - (*ptr_server) = SERVER(gui_current_window->buffer); + (*ptr_server) = GUI_SERVER(gui_current_window->buffer); if (!(*ptr_server)) - (*ptr_server) = SERVER(gui_buffers); + (*ptr_server) = GUI_SERVER(gui_buffers); } if (channel && channel[0]) @@ -238,7 +238,7 @@ plugin_msg_handler_add (t_weechat_plugin *plugin, char *irc_command, } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin %s: unable to add handler for IRC command \"%s\" (not enough memory)\n"), WEECHAT_ERROR, plugin->name, irc_command); @@ -275,7 +275,7 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command, if (plugin_cmd_handler_search (command)) { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin %s: unable to add handler for \"%s\" command " "(already exists)\n"), @@ -285,7 +285,7 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command, if (ascii_strcasecmp (command, "builtin") == 0) { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin %s: unable to add handler for \"%s\" command " "(forbidden)\n"), @@ -327,7 +327,7 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command, } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"), WEECHAT_ERROR, plugin->name, command); @@ -384,7 +384,7 @@ plugin_timer_handler_add (t_weechat_plugin *plugin, int interval, } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin %s: unable to add timer handler (not enough memory)\n"), WEECHAT_ERROR, plugin->name); @@ -440,7 +440,7 @@ plugin_keyboard_handler_add (t_weechat_plugin *plugin, } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin %s: unable to add keyboard handler (not enough memory)\n"), WEECHAT_ERROR, plugin->name); @@ -497,7 +497,7 @@ plugin_event_handler_add (t_weechat_plugin *plugin, char *event, } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin %s: unable to add event handler (not enough memory)\n"), WEECHAT_ERROR, plugin->name); @@ -839,7 +839,7 @@ plugin_modifier_add (t_weechat_plugin *plugin, char *type, char *command, } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin %s: unable to add modifier (not enough memory)\n"), WEECHAT_ERROR, plugin->name); @@ -1072,7 +1072,7 @@ plugin_load (char *filename) handle = dlopen (full_name, RTLD_GLOBAL | RTLD_NOW); if (!handle) { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s unable to load plugin \"%s\": %s\n"), WEECHAT_ERROR, full_name, dlerror()); free (full_name); @@ -1083,7 +1083,7 @@ plugin_load (char *filename) if (!name) { dlclose (handle); - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"), WEECHAT_ERROR, full_name); free (full_name); @@ -1093,7 +1093,7 @@ plugin_load (char *filename) if (plugin_search (name)) { dlclose (handle); - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s unable to load plugin \"%s\": a plugin with " "same name already exists\n"), @@ -1106,7 +1106,7 @@ plugin_load (char *filename) if (!description) { dlclose (handle); - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"), WEECHAT_ERROR, full_name); free (full_name); @@ -1117,7 +1117,7 @@ plugin_load (char *filename) if (!version) { dlclose (handle); - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"), WEECHAT_ERROR, full_name); free (full_name); @@ -1130,7 +1130,7 @@ plugin_load (char *filename) if (!init_func) { dlclose (handle); - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to load\n"), WEECHAT_ERROR, full_name); free (full_name); @@ -1213,7 +1213,7 @@ plugin_load (char *filename) weechat_plugins = new_plugin; last_weechat_plugin = new_plugin; - irc_display_prefix (NULL, NULL, PREFIX_PLUGIN); + irc_display_prefix (NULL, NULL, GUI_PREFIX_PLUGIN); gui_printf (NULL, _("Initializing plugin \"%s\" %s\n"), new_plugin->name, new_plugin->version); @@ -1221,7 +1221,7 @@ plugin_load (char *filename) /* init plugin */ if (((t_weechat_init_func *)init_func) (new_plugin) < 0) { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s unable to initialize plugin \"%s\"\n"), WEECHAT_ERROR, full_name); @@ -1232,7 +1232,7 @@ plugin_load (char *filename) } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s unable to load plugin \"%s\" (not enough memory)\n"), WEECHAT_ERROR, full_name); @@ -1240,7 +1240,7 @@ plugin_load (char *filename) return NULL; } - irc_display_prefix (NULL, NULL, PREFIX_PLUGIN); + irc_display_prefix (NULL, NULL, GUI_PREFIX_PLUGIN); gui_printf (NULL, _("Plugin \"%s\" (%s) loaded.\n"), name, full_name); @@ -1415,12 +1415,12 @@ plugin_unload_name (char *name) if (ptr_plugin) { plugin_unload (ptr_plugin); - irc_display_prefix (NULL, NULL, PREFIX_PLUGIN); + irc_display_prefix (NULL, NULL, GUI_PREFIX_PLUGIN); gui_printf (NULL, _("Plugin \"%s\" unloaded.\n"), name); } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin \"%s\" not found\n"), WEECHAT_ERROR, name); @@ -1455,7 +1455,7 @@ plugin_reload_name (char *name) if (filename) { plugin_unload (ptr_plugin); - irc_display_prefix (NULL, NULL, PREFIX_PLUGIN); + irc_display_prefix (NULL, NULL, GUI_PREFIX_PLUGIN); gui_printf (NULL, _("Plugin \"%s\" unloaded.\n"), name); plugin_load (filename); free (filename); @@ -1463,7 +1463,7 @@ plugin_reload_name (char *name) } else { - irc_display_prefix (NULL, NULL, PREFIX_ERROR); + irc_display_prefix (NULL, NULL, GUI_PREFIX_ERROR); gui_printf (NULL, _("%s plugin \"%s\" not found\n"), WEECHAT_ERROR, name); |