diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-command.c | 94 | ||||
-rw-r--r-- | src/core/wee-hook.c | 2 | ||||
-rw-r--r-- | src/plugins/alias/alias.c | 18 | ||||
-rw-r--r-- | src/plugins/demo/demo.c | 18 | ||||
-rw-r--r-- | src/plugins/fifo/fifo.c | 8 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 354 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.h | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.c | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 8 | ||||
-rw-r--r-- | src/plugins/irc/irc.c | 12 | ||||
-rw-r--r-- | src/plugins/logger/logger.c | 12 | ||||
-rw-r--r-- | src/plugins/weechat-plugin.h | 20 |
12 files changed, 276 insertions, 276 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 5eb3ab458..0ffb8a251 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -103,7 +103,7 @@ command_buffer (void *data, void *buffer, "command"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], "buffer"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } error = NULL; @@ -127,7 +127,7 @@ command_buffer (void *data, void *buffer, gui_chat_printf (NULL, _("%sError: incorrect buffer number"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } else if (string_strcasecmp (argv[1], "close") == 0) @@ -138,7 +138,7 @@ command_buffer (void *data, void *buffer, _("%sError: WeeChat main buffer can't be " "closed"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } gui_buffer_free (buffer, 1); gui_status_draw (gui_current_window->buffer, 1); @@ -179,7 +179,7 @@ command_buffer (void *data, void *buffer, gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], GUI_BUFFER_NOTIFY_LEVEL_MIN, GUI_BUFFER_NOTIFY_LEVEL_MAX); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } gui_chat_printf (NULL, _("%sNew notify level for %s%s%s: " @@ -225,7 +225,7 @@ command_buffer (void *data, void *buffer, gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], GUI_BUFFER_NOTIFY_LEVEL_MIN, GUI_BUFFER_NOTIFY_LEVEL_MAX); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } } @@ -240,7 +240,7 @@ command_buffer (void *data, void *buffer, "command"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], "buffer"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } value = string_remove_quotes (argv_eol[3], "'\""); gui_buffer_set (buffer, argv[2], (value) ? value : argv_eol[3]); @@ -313,7 +313,7 @@ command_buffer (void *data, void *buffer, } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -346,7 +346,7 @@ command_builtin (void *data, void *buffer, } } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -388,7 +388,7 @@ command_clear (void *data, void *buffer, else gui_buffer_clear (buffer); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -467,11 +467,11 @@ command_debug (void *data, void *buffer, _("%sError: unknown option for \"%s\" command"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], "debug"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -587,7 +587,7 @@ command_help (void *data, void *buffer, gui_chat_printf (NULL, "%s", HOOK_COMMAND(ptr_hook, args_description)); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } } gui_chat_printf (NULL, @@ -597,7 +597,7 @@ command_help (void *data, void *buffer, argv[1]); break; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -622,7 +622,7 @@ command_history (void *data, void *buffer, if (string_strcasecmp (argv[1], "clear") == 0) { gui_history_buffer_free (buffer); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } else n_user = atoi (argv[1]); @@ -652,7 +652,7 @@ command_history (void *data, void *buffer, } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -716,7 +716,7 @@ command_key (void *data, void *buffer, { command_key_display (ptr_key, 0); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } if (string_strcasecmp (argv[1], "functions") == 0) @@ -732,7 +732,7 @@ command_key (void *data, void *buffer, _(gui_key_functions[i].description)); i++; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } if (string_strcasecmp (argv[1], "reset") == 0) @@ -751,9 +751,9 @@ command_key (void *data, void *buffer, _("%sError: \"-yes\" argument is required for " "keys reset (security reason)"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } if (string_strcasecmp (argv[1], "unbind") == 0) @@ -773,10 +773,10 @@ command_key (void *data, void *buffer, _("%sError: unable to unbind key \"%s\""), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], argv[2]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } if (string_strcasecmp (argv[1], "call") == 0) @@ -802,10 +802,10 @@ command_key (void *data, void *buffer, _("%sError: unknown key function \"%s\""), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], argv[2]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* display a key */ @@ -828,7 +828,7 @@ command_key (void *data, void *buffer, } if (internal_code) free (internal_code); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* bind new key */ @@ -841,9 +841,9 @@ command_key (void *data, void *buffer, _("%sError: unable to bind key \"%s\""), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], argv[1]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1122,7 +1122,7 @@ command_plugin (void *data, void *buffer, "plugin"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1145,7 +1145,7 @@ command_quit (void *data, void *buffer, quit_weechat = 1; - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1186,7 +1186,7 @@ command_reload (void *data, void *buffer, /* tell to plugins to reload their configuration */ (void) hook_event_exec ("config_reload", NULL); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1224,7 +1224,7 @@ command_save (void *data, void *buffer, _("%sError: failed to save plugins options"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1396,7 +1396,7 @@ command_set (void *data, void *buffer, number_found, GUI_COLOR(GUI_COLOR_CHAT)); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* set option value */ @@ -1410,7 +1410,7 @@ command_set (void *data, void *buffer, "found"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], argv[1]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } value = string_remove_quotes (argv_eol[3], "'\""); rc = config_file_option_set (ptr_option, @@ -1432,11 +1432,11 @@ command_set (void *data, void *buffer, "option \"%s\""), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], argv[1]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1522,7 +1522,7 @@ command_setp (void *data, void *buffer, argv[1]); if (pos) pos[0] = '.'; - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } else ptr_name = argv[1]; @@ -1549,14 +1549,14 @@ command_setp (void *data, void *buffer, ptr_name); if (value) free (value); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } if (value) free (value); } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1588,7 +1588,7 @@ command_upgrade (void *data, void *buffer, gui_chat_printf_error (NULL, _("Error: can't upgrade: connection to at least " "one server is pending")); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; }*/ /* TODO: remove this test, and fix gnutls save/load in session */ /*if (ptr_server->is_connected && ptr_server->ssl_connected) @@ -1597,14 +1597,14 @@ command_upgrade (void *data, void *buffer, _("Error: can't upgrade: connection to at least " "one SSL server is active " "(should be fixed in a future version)")); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } if (ptr_server->outqueue) { gui_chat_printf_error_nolog (NULL, _("Error: can't upgrade: anti-flood is active on " "at least one server (sending many lines)")); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } @@ -1623,7 +1623,7 @@ command_upgrade (void *data, void *buffer, free (filename); gui_chat_printf_error_nolog (NULL, _("Error: unable to save session in file")); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } exec_args[0] = strdup (ptr_binary); @@ -1654,7 +1654,7 @@ command_upgrade (void *data, void *buffer, exit (EXIT_FAILURE);*/ /* never executed */ - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* @@ -1715,7 +1715,7 @@ command_uptime (void *data, void *buffer, ctime (&weechat_start_time)); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1818,7 +1818,7 @@ command_window (void *data, void *buffer, "command"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], "window merge"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } else @@ -1830,7 +1830,7 @@ command_window (void *data, void *buffer, "there's no other window with same " "size near current one."), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } } @@ -1865,10 +1865,10 @@ command_window (void *data, void *buffer, _("%sError: unknown option for \"%s\" command"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], "window"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index ebe656c39..033eddcf1 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -352,7 +352,7 @@ hook_command_exec (void *buffer, char *string, int only_builtin) hook_exec_recursion--; if (hook_exec_recursion == 0) hook_remove_deleted (); - if (rc == PLUGIN_RC_FAILED) + if (rc == WEECHAT_RC_ERROR) return 0; else return 1; diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index fe4ffaeb3..238f40e3f 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -199,7 +199,7 @@ alias_cb (void *data, void *buffer, int argc, char **argv, "alias \"/%s\""), weechat_prefix ("error"), ptr_alias->name); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } else { @@ -281,7 +281,7 @@ alias_cb (void *data, void *buffer, int argc, char **argv, weechat_string_free_splitted_command (commands); } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -554,13 +554,13 @@ alias_config_reload_event_cb (void *data, char *event, void *pointer) weechat_printf (NULL, _("%sAlias: configuration file reloaded"), weechat_prefix ("info")); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } weechat_printf (NULL, _("%sAlias: failed to reload alias configuration " "file"), weechat_prefix ("error")); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* @@ -601,7 +601,7 @@ alias_command_cb (void *data, void *buffer, int argc, char **argv, "=> \"%\""), weechat_prefix ("error"), alias_name, argv_eol[2]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } weechat_printf (NULL, _("%sAlias \"%s\" => \"%s\" created"), @@ -710,7 +710,7 @@ alias_completion_cb (void *data, char *completion, void *list) weechat_list_add (list, ptr_alias->name, "sort"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -728,7 +728,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) "%sAlias: error creating configuration file \"%s\"", weechat_prefix("error"), ALIAS_CONFIG_FILENAME); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } alias_config_read (); @@ -766,7 +766,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) completion = weechat_hook_completion ("alias", &alias_completion_cb, NULL); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -784,5 +784,5 @@ weechat_plugin_end () weechat_unhook (config_reload); weechat_unhook (completion); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c index 151a8e282..5a87ff3c4 100644 --- a/src/plugins/demo/demo.c +++ b/src/plugins/demo/demo.c @@ -78,7 +78,7 @@ demo_printf_command_cb (void *data, void *buffer, int argc, char **argv, weechat_color ("color_chat_nick_color4")); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -114,7 +114,7 @@ demo_buffer_command_cb (void *data, void *buffer, int argc, char **argv, weechat_buffer_set (new_buffer, "display", "1"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -202,7 +202,7 @@ demo_infolist_command_cb (void *data, void *buffer, int argc, char **argv, demo_infolist_print (infolist, "buffer"); weechat_infolist_free (infolist); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } if (weechat_strcasecmp (argv[1], "buffer_lines") == 0) { @@ -212,7 +212,7 @@ demo_infolist_command_cb (void *data, void *buffer, int argc, char **argv, demo_infolist_print (infolist, "buffer_line"); weechat_infolist_free (infolist); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } } @@ -222,7 +222,7 @@ demo_infolist_command_cb (void *data, void *buffer, int argc, char **argv, weechat_prefix ("error"), "demo_infolist", "demo_infolist"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -250,7 +250,7 @@ demo_info_command_cb (void *data, void *buffer, int argc, char **argv, weechat_prefix ("error"), "demo_info", "demo_info"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -267,7 +267,7 @@ demo_event_cb (void *data, char *event, void *pointer) _("demo_event: event: %s, pointer: %X"), event, pointer); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -315,7 +315,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) weechat_hook_event ("*", &demo_event_cb, NULL); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -325,5 +325,5 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) int weechat_plugin_end () { - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index 95fc05ed2..f6aaddd12 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -296,7 +296,7 @@ fifo_read () } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -322,7 +322,7 @@ fifo_config_cb (void *data, char *type, char *option, char *value) fifo_remove (); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -340,7 +340,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) weechat_hook_config ("plugin", "fifo.fifo", &fifo_config_cb, NULL); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -352,5 +352,5 @@ weechat_plugin_end () { fifo_remove (); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 516e58be2..ce245987c 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -50,7 +50,7 @@ irc_command_admin (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -61,7 +61,7 @@ irc_command_admin (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "ADMIN"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -173,7 +173,7 @@ irc_command_ame (void *data, void *buffer, int argc, char **argv, } //gui_add_hotlist = 1; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -238,9 +238,9 @@ irc_command_amsg (void *data, void *buffer, int argc, char **argv, //gui_add_hotlist = 1; } else - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -380,7 +380,7 @@ irc_command_away (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -401,7 +401,7 @@ irc_command_away (void *data, void *buffer, int argc, char **argv, //gui_status_draw (window->buffer, 1); //gui_add_hotlist = 1; - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -417,7 +417,7 @@ irc_command_ban (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -447,7 +447,7 @@ irc_command_ban (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "ban"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } @@ -468,12 +468,12 @@ irc_command_ban (void *data, void *buffer, int argc, char **argv, "executed in a channel buffer"), weechat_prefix ("error"), "ban"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } irc_server_sendf (ptr_server, "MODE %s +b", ptr_channel->name); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -562,7 +562,7 @@ irc_command_connect (void *data, void *buffer, int argc, char **argv, "option"), weechat_prefix ("error"), "-port"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } error = NULL; number = strtol (argv[++i], &error, 10); @@ -661,9 +661,9 @@ irc_command_connect (void *data, void *buffer, int argc, char **argv, connect_ok = irc_command_connect_one_server (ptr_server, no_join); if (!connect_ok) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -679,7 +679,7 @@ irc_command_ctcp (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -688,7 +688,7 @@ irc_command_ctcp (void *data, void *buffer, int argc, char **argv, { irc_cmd = strdup (argv[2]); if (!irc_cmd) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; pos = irc_cmd; while (pos[0]) @@ -751,7 +751,7 @@ irc_command_ctcp (void *data, void *buffer, int argc, char **argv, free (irc_cmd); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -768,7 +768,7 @@ irc_command_cycle (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -803,12 +803,12 @@ irc_command_cycle (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can not be executed " "on a server buffer"), weechat_prefix ("error"), "cycle"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* does nothing on private buffer (cycle has no sense!) */ if (ptr_channel->type != IRC_CHANNEL_TYPE_CHANNEL) - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; channel_name = ptr_channel->name; pos_args = argv_eol[1]; @@ -823,12 +823,12 @@ irc_command_cycle (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can not be executed on " "a server buffer"), weechat_prefix ("error"), "part"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* does nothing on private buffer (cycle has no sense!) */ if (ptr_channel->type != IRC_CHANNEL_TYPE_CHANNEL) - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; channel_name = ptr_channel->name; pos_args = NULL; @@ -854,7 +854,7 @@ irc_command_cycle (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "PART %s", channel_name); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -867,7 +867,7 @@ irc_command_dcc (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make compiler happy */ (void) data; @@ -911,7 +911,7 @@ irc_command_dcc (void *data, void *buffer, int argc, char **argv, weechat_printf (ptr_server->buffer, _("%sirc: wrong arguments for \"%s\" command"), weechat_prefix ("error"), "dcc"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } else @@ -919,7 +919,7 @@ irc_command_dcc (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "dcc"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -932,7 +932,7 @@ irc_command_dehalfop (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -954,9 +954,9 @@ irc_command_dehalfop (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be executed in " "a channel buffer"), weechat_prefix ("error"), "dehalfop"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -969,7 +969,7 @@ irc_command_deop (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -991,9 +991,9 @@ irc_command_deop (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be executed in " "a channel buffer"), weechat_prefix ("error"), "deop"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1006,7 +1006,7 @@ irc_command_devoice (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1028,9 +1028,9 @@ irc_command_devoice (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "devoice"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1043,7 +1043,7 @@ irc_command_die (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1052,7 +1052,7 @@ irc_command_die (void *data, void *buffer, int argc, char **argv, (void) argv_eol; irc_server_sendf (ptr_server, "DIE"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1180,9 +1180,9 @@ irc_command_disconnect (void *data, void *buffer, int argc, char **argv, } if (!disconnect_ok) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1195,7 +1195,7 @@ irc_command_halfop (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1217,9 +1217,9 @@ irc_command_halfop (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "halfop"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1232,7 +1232,7 @@ irc_command_info (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1242,7 +1242,7 @@ irc_command_info (void *data, void *buffer, int argc, char **argv, irc_server_sendf (ptr_server, "INFO %s", argv_eol[1]); else irc_server_sendf (ptr_server, "INFO"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1255,7 +1255,7 @@ irc_command_invite (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1274,11 +1274,11 @@ irc_command_invite (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "invite"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1291,7 +1291,7 @@ irc_command_ison (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1304,7 +1304,7 @@ irc_command_ison (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "ison"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1330,7 +1330,7 @@ irc_command_join (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1343,7 +1343,7 @@ irc_command_join (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "join"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1358,7 +1358,7 @@ irc_command_kick (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1373,7 +1373,7 @@ irc_command_kick (void *data, void *buffer, int argc, char **argv, _("%sirc: wrong arguments for \"%s\" " "command"), weechat_prefix ("error"), "kick"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } pos_channel = argv[1]; pos_nick = argv[2]; @@ -1393,7 +1393,7 @@ irc_command_kick (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "kick"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } @@ -1409,7 +1409,7 @@ irc_command_kick (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "kick"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1424,7 +1424,7 @@ irc_command_kickban (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1439,7 +1439,7 @@ irc_command_kickban (void *data, void *buffer, int argc, char **argv, _("%sirc: wrong arguments for \"%s\" " "command"), weechat_prefix ("error"), "kickban"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } pos_channel = argv[1]; pos_nick = argv[2]; @@ -1459,7 +1459,7 @@ irc_command_kickban (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "kickban"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } @@ -1477,7 +1477,7 @@ irc_command_kickban (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "kickban"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1490,7 +1490,7 @@ irc_command_kill (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1505,7 +1505,7 @@ irc_command_kill (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "kill"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1519,7 +1519,7 @@ irc_command_links (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1530,7 +1530,7 @@ irc_command_links (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "LINKS"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1546,7 +1546,7 @@ irc_command_list (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1574,7 +1574,7 @@ irc_command_list (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" is not a valid regular " "expression (%s)"), weechat_prefix ("error"), argv_eol, buf); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } else irc_server_sendf (ptr_server, "LIST"); @@ -1585,13 +1585,13 @@ irc_command_list (void *data, void *buffer, int argc, char **argv, _("%sirc: not enough memory for regular " "expression"), weechat_prefix ("error")); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } else irc_server_sendf (ptr_server, "LIST"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1604,7 +1604,7 @@ irc_command_lusers (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1615,7 +1615,7 @@ irc_command_lusers (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "LUSERS"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1628,7 +1628,7 @@ irc_command_me (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1642,7 +1642,7 @@ irc_command_me (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can not be executed " "on a server buffer"), weechat_prefix ("error"), "me"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } irc_command_me_channel (ptr_server, ptr_channel, argv_eol[1]); } @@ -1651,7 +1651,7 @@ irc_command_me (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "me"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1674,7 +1674,7 @@ irc_command_mode (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1687,7 +1687,7 @@ irc_command_mode (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "mode"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1700,7 +1700,7 @@ irc_command_motd (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1711,7 +1711,7 @@ irc_command_motd (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "MOTD"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1730,7 +1730,7 @@ irc_command_msg (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1886,7 +1886,7 @@ irc_command_msg (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "msg"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1899,7 +1899,7 @@ irc_command_names (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1918,11 +1918,11 @@ irc_command_names (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "names"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1963,7 +1963,7 @@ irc_command_nick (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -1976,7 +1976,7 @@ irc_command_nick (void *data, void *buffer, int argc, char **argv, weechat_printf (ptr_server->buffer, _("%sirc: wrong arguments for \"%s\" command"), weechat_prefix ("error"), "nick"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) @@ -1994,7 +1994,7 @@ irc_command_nick (void *data, void *buffer, int argc, char **argv, } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2009,7 +2009,7 @@ irc_command_notice (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2036,7 +2036,7 @@ irc_command_notice (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "notice"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2049,7 +2049,7 @@ irc_command_op (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2071,9 +2071,9 @@ irc_command_op (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "op"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2086,7 +2086,7 @@ irc_command_oper (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2099,7 +2099,7 @@ irc_command_oper (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "oper"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2114,7 +2114,7 @@ irc_command_part (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2135,7 +2135,7 @@ irc_command_part (void *data, void *buffer, int argc, char **argv, "executed in a channel or " "private buffer"), weechat_prefix ("error"), "part"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } channel_name = ptr_channel->name; pos_args = argv_eol[1]; @@ -2150,7 +2150,7 @@ irc_command_part (void *data, void *buffer, int argc, char **argv, "executed in a channel or private " "buffer"), weechat_prefix ("error"), "part"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } if (!ptr_channel->nicks) { @@ -2159,7 +2159,7 @@ irc_command_part (void *data, void *buffer, int argc, char **argv, irc_channel_free (ptr_server, ptr_channel); //gui_status_draw (gui_current_window->buffer, 1); //gui_input_draw (gui_current_window->buffer, 1); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } channel_name = ptr_channel->name; pos_args = NULL; @@ -2185,7 +2185,7 @@ irc_command_part (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "PART %s", channel_name); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2198,7 +2198,7 @@ irc_command_ping (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2211,7 +2211,7 @@ irc_command_ping (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "ping"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2224,7 +2224,7 @@ irc_command_pong (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2237,7 +2237,7 @@ irc_command_pong (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "pong"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2252,7 +2252,7 @@ irc_command_query (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2273,7 +2273,7 @@ irc_command_query (void *data, void *buffer, int argc, char **argv, _("%sirc: cannot create new private " "buffer \"%s\""), weechat_prefix ("error"), argv[1]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } weechat_buffer_set (ptr_channel->buffer, "display", "1"); @@ -2301,7 +2301,7 @@ irc_command_query (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "query"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2314,7 +2314,7 @@ irc_command_quote (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server)// || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2327,7 +2327,7 @@ irc_command_quote (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "quote"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2431,9 +2431,9 @@ irc_command_reconnect (void *data, void *buffer, int argc, char **argv, reconnect_ok = irc_command_reconnect_one_server (ptr_server, no_join); if (!reconnect_ok) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2446,7 +2446,7 @@ irc_command_rehash (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2456,7 +2456,7 @@ irc_command_rehash (void *data, void *buffer, int argc, char **argv, irc_server_sendf (ptr_server, "REHASH"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2469,7 +2469,7 @@ irc_command_restart (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2479,7 +2479,7 @@ irc_command_restart (void *data, void *buffer, int argc, char **argv, irc_server_sendf (ptr_server, "RESTART"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2573,7 +2573,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, _("%sirc: server \"%s\" already exists, " "can't create it!"), weechat_prefix ("error"), argv[2]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* init server struct */ @@ -2607,7 +2607,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "\"%s\" option"), weechat_prefix ("error"), "-port"); irc_server_free_data (&server_tmp); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } error = NULL; number = strtol (argv[++i], &error, 10); @@ -2623,7 +2623,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "\"%s\" option"), weechat_prefix ("error"), "-pwd"); irc_server_free_data (&server_tmp); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } server_tmp.password = strdup (argv[++i]); } @@ -2637,7 +2637,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, weechat_prefix ("error"), "-nicks"); irc_server_free_data (&server_tmp); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } server_tmp.nick1 = strdup (argv[++i]); server_tmp.nick2 = strdup (argv[++i]); @@ -2653,7 +2653,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, weechat_prefix ("error"), "-username"); irc_server_free_data (&server_tmp); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } server_tmp.username = strdup (argv[++i]); } @@ -2667,7 +2667,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, weechat_prefix ("error"), "-realname"); irc_server_free_data (&server_tmp); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } server_tmp.realname = strdup (argv[++i]); } @@ -2681,7 +2681,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, weechat_prefix ("error"), "-command"); irc_server_free_data (&server_tmp); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } server_tmp.command = strdup (argv[++i]); } @@ -2695,7 +2695,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, weechat_prefix ("error"), "-autojoin"); irc_server_free_data (&server_tmp); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } server_tmp.autojoin = strdup (argv[++i]); } @@ -2739,7 +2739,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, _("%sirc: unable to create server"), weechat_prefix ("error")); irc_server_free_data (&server_tmp); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } if (new_server->autoconnect) @@ -2763,7 +2763,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "\"%s\" command"), weechat_prefix ("error"), argv[2], "server copy"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* check if target name already exists */ @@ -2774,7 +2774,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "\"%s\" command"), weechat_prefix ("error"), argv[3], "server copy"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* duplicate server */ @@ -2790,10 +2790,10 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, IRC_COLOR_CHAT_SERVER, argv[3]); //gui_window_redraw_all_buffers (); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } else if (weechat_strcasecmp (argv[1], "rename") == 0) { @@ -2811,7 +2811,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "\"%s\" command"), weechat_prefix ("error"), argv[2], "server rename"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* check if target name already exists */ @@ -2822,7 +2822,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "\"%s\" command"), weechat_prefix ("error"), argv[3], "server rename"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* rename server */ @@ -2838,10 +2838,10 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, IRC_COLOR_CHAT_SERVER, argv[3]); //gui_window_redraw_all_buffers (); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } else if (weechat_strcasecmp (argv[1], "keep") == 0) { @@ -2859,7 +2859,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "\"%s\" command"), weechat_prefix ("error"), argv[2], "server keep"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* check that it is temporary server */ @@ -2869,7 +2869,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, _("%sirc: server \"%s\" is not a temporary " "server"), weechat_prefix ("error"), argv[2]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* remove temporary flag on server */ @@ -2883,7 +2883,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, argv[2], IRC_COLOR_CHAT); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } else if (weechat_strcasecmp (argv[1], "del") == 0) { @@ -2901,7 +2901,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "\"%s\" command"), weechat_prefix ("error"), argv[2], "server del"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } if (server_found->is_connected) { @@ -2910,7 +2910,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, "because you are connected to. " "Try \"/disconnect %s\" before."), weechat_prefix ("error"), argv[2], argv[2]); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* @@ -2941,7 +2941,7 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, //gui_window_redraw_buffer (window->buffer); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } else if (weechat_strcasecmp (argv[1], "deloutq") == 0) { @@ -2954,18 +2954,18 @@ irc_command_server (void *data, void *buffer, int argc, char **argv, _("irc: messages outqueue DELETED for all " "servers. Some messages from you or " "WeeChat may have been lost!")); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } else { weechat_printf (NULL, _("%sirc: unknown option for \"%s\" command"), weechat_prefix ("error"), "server"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -2978,7 +2978,7 @@ irc_command_service (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -2991,7 +2991,7 @@ irc_command_service (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "service"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3004,7 +3004,7 @@ irc_command_servlist (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3015,7 +3015,7 @@ irc_command_servlist (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "SERVLIST"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3028,7 +3028,7 @@ irc_command_squery (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3046,7 +3046,7 @@ irc_command_squery (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "squery"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3059,7 +3059,7 @@ irc_command_squit (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3072,7 +3072,7 @@ irc_command_squit (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "squit"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3085,7 +3085,7 @@ irc_command_stats (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3096,7 +3096,7 @@ irc_command_stats (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "STATS"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3110,7 +3110,7 @@ irc_command_summon (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3123,7 +3123,7 @@ irc_command_summon (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "summon"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3136,7 +3136,7 @@ irc_command_time (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3147,7 +3147,7 @@ irc_command_time (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "TIME"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3162,7 +3162,7 @@ irc_command_topic (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3193,7 +3193,7 @@ irc_command_topic (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "topic"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } @@ -3210,7 +3210,7 @@ irc_command_topic (void *data, void *buffer, int argc, char **argv, irc_server_sendf (ptr_server, "TOPIC %s", channel_name); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3223,7 +3223,7 @@ irc_command_trace (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3234,7 +3234,7 @@ irc_command_trace (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "TRACE"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3250,7 +3250,7 @@ irc_command_unban (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3280,7 +3280,7 @@ irc_command_unban (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "unban"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } } @@ -3297,10 +3297,10 @@ irc_command_unban (void *data, void *buffer, int argc, char **argv, weechat_printf (ptr_server->buffer, _("%sirc: wrong argument count for \"%s\" command"), weechat_prefix ("error"), "unban"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3313,7 +3313,7 @@ irc_command_userhost (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3326,7 +3326,7 @@ irc_command_userhost (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "userhost"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3339,7 +3339,7 @@ irc_command_users (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3350,7 +3350,7 @@ irc_command_users (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "USERS"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3363,7 +3363,7 @@ irc_command_version (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3382,7 +3382,7 @@ irc_command_version (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "VERSION"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3395,7 +3395,7 @@ irc_command_voice (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3417,9 +3417,9 @@ irc_command_voice (void *data, void *buffer, int argc, char **argv, _("%sirc: \"%s\" command can only be " "executed in a channel buffer"), weechat_prefix ("error"), "voice"); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3433,7 +3433,7 @@ irc_command_wallops (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3446,7 +3446,7 @@ irc_command_wallops (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "wallops"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3459,7 +3459,7 @@ irc_command_who (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3470,7 +3470,7 @@ irc_command_who (void *data, void *buffer, int argc, char **argv, else irc_server_sendf (ptr_server, "WHO"); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3483,7 +3483,7 @@ irc_command_whois (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3496,7 +3496,7 @@ irc_command_whois (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "whois"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -3509,7 +3509,7 @@ irc_command_whowas (void *data, void *buffer, int argc, char **argv, { IRC_COMMAND_GET_SERVER(buffer); if (!ptr_server || !ptr_server->is_connected) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; /* make C compiler happy */ (void) data; @@ -3522,7 +3522,7 @@ irc_command_whowas (void *data, void *buffer, int argc, char **argv, IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "whowas"); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* diff --git a/src/plugins/irc/irc-command.h b/src/plugins/irc/irc-command.h index cec8fb8c4..7523421bb 100644 --- a/src/plugins/irc/irc-command.h +++ b/src/plugins/irc/irc-command.h @@ -47,7 +47,7 @@ weechat_printf (__buffer, \ _("%sirc: too few arguments for \"%s\" command"), \ weechat_prefix ("error"), __command); \ - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; extern void irc_command_quit_server (struct t_irc_server *, char *); diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index afe0c22b3..4589ee9a9 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -777,14 +777,14 @@ irc_config_reload_cb (void *data, char *event, void *pointer) weechat_printf (NULL, _("%sirc: configuration file reloaded"), weechat_prefix ("info")); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } weechat_printf (NULL, _("%sirc: failed to reload alias configuration " "file"), weechat_prefix ("error")); - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; } /* diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 729f91a39..e47e869c6 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -1303,7 +1303,7 @@ irc_server_recv (void *arg_server) int num_read; if (!server) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; #ifdef HAVE_GNUTLS if (server->ssl_connected) @@ -1328,7 +1328,7 @@ irc_server_recv (void *arg_server) irc_server_disconnect (server, 1); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -1555,7 +1555,7 @@ irc_server_child_read (void *arg_server) weechat_prefix ("error")); irc_server_close_connection (server); irc_server_reconnect_schedule (server); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } } #endif @@ -1619,7 +1619,7 @@ irc_server_child_read (void *arg_server) break; } } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c index 5f652d580..35cb7d3e5 100644 --- a/src/plugins/irc/irc.c +++ b/src/plugins/irc/irc.c @@ -83,7 +83,7 @@ irc_dump () irc_dcc_print_log (); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } */ @@ -133,7 +133,7 @@ irc_quit_cb (void *data, char *event, void *pointer) irc_command_quit_server (ptr_server, (char *)pointer); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } @@ -154,10 +154,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) #endif if (!irc_config_init ()) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; if (irc_config_read () < 0) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; irc_create_directories (); @@ -180,7 +180,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) NULL); */ - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -213,5 +213,5 @@ weechat_plugin_end () gnutls_global_deinit(); #endif - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c index 22fac446c..e68a313e9 100644 --- a/src/plugins/logger/logger.c +++ b/src/plugins/logger/logger.c @@ -385,7 +385,7 @@ logger_event_cb (void *data, char *event, void *pointer) logger_end (logger_buffer_search (pointer)); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -421,7 +421,7 @@ logger_print_cb (void *data, void *buffer, time_t date, char *prefix, message); } - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -435,9 +435,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) logger_config_read (); if (!logger_path || !logger_time_format) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; if (!logger_create_directory ()) - return PLUGIN_RC_FAILED; + return WEECHAT_RC_ERROR; logger_start_buffer_all (); @@ -446,7 +446,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) weechat_hook_print (NULL, NULL, 1, &logger_print_cb, NULL); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } /* @@ -458,5 +458,5 @@ weechat_plugin_end () { logger_end_all (); - return PLUGIN_RC_SUCCESS; + return WEECHAT_RC_OK; } diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index 04ca78738..da2ae45d3 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -23,19 +23,19 @@ #include <sys/types.h> -/* return codes for init function and handlers */ -#define PLUGIN_RC_FAILED -1 /* function/handler failed */ -#define PLUGIN_RC_SUCCESS 0 /* function/handler ok */ +/* return codes for plugin functions */ +#define WEECHAT_RC_ERROR -1 /* function failed with an error */ +#define WEECHAT_RC_OK 0 /* function ok */ /* return codes specific to message handlers: messages can be discarded for WeeChat, for plugins, or both */ -#define PLUGIN_RC_IGNORE_WEECHAT 1 /* ignore WeeChat for this message */ -#define PLUGIN_RC_IGNORE_PLUGINS 2 /* ignore other plugins for msg */ -#define PLUGIN_RC_IGNORE_ALL (PLUGIN_RC_OK_IGNORE_WEECHAT \ - | PLUGIN_RC_OK_IGNORE_PLUGINS) - /* ignore WeeChat and other plugins*/ -#define PLUGIN_RC_WITH_HIGHLIGHT 4 /* ok and ask for highlight */ - /* (for message handler only) */ +#define WEECHAT_RC_IGNORE_WEECHAT 1 /* ignore WeeChat for this message */ +#define WEECHAT_RC_IGNORE_PLUGINS 2 /* ignore other plugins for msg */ +#define WEECHAT_RC_IGNORE_ALL (PLUGIN_RC_OK_IGNORE_WEECHAT \ + | PLUGIN_RC_OK_IGNORE_PLUGINS) + /* ignore WeeChat and other plugins */ +#define WEECHAT_RC_WITH_HIGHLIGHT 4 /* ok and ask for highlight */ + /* (for message handler only) */ struct t_weechat_plugin { |