diff options
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/weechat.en.xml | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/doc/en/weechat.en.xml b/doc/en/weechat.en.xml index ae8361f32..6c703a0b4 100644 --- a/doc/en/weechat.en.xml +++ b/doc/en/weechat.en.xml @@ -1883,10 +1883,10 @@ plugin->log (plugin, "freenode", "#weechat", "test"); <para> Example: <screen> -int msg_kick (t_weechat_plugin *plugin, char *server, char *command, - char *arguments, char *handler_args, void *handler_pointer) +int msg_kick (t_weechat_plugin *plugin, int argc, char **argv, + char *handler_args, void *handler_pointer) { - plugin->print (plugin, server, NULL, "KICK received"); + plugin->print (plugin, argv[0], NULL, "KICK received"); return PLUGIN_RC_OK; } ... @@ -2127,13 +2127,12 @@ plugin->msg_handler_add (plugin, "KICK", &msg_kick, NULL, NULL); <para> Example: <screen> -int cmd_test (t_weechat_plugin *plugin, char *server, - char *command, char *arguments, char *handler_args, - void *handler_pointer) +int cmd_test (t_weechat_plugin *plugin, int argc, char **argv, + char *handler_args, void *handler_pointer) { - plugin->print (plugin, server, NULL, + plugin->print (plugin, argv[0], NULL, "test command, nick: %s", - (arguments) ? arguments : "none"); + (argv[2]) ? argv[2] : "none"); return PLUGIN_RC_OK; } ... @@ -2224,8 +2223,8 @@ plugin->cmd_handler_add (plugin, "test", "Test command", <para> Example: <screen> -int my_timer (t_weechat_plugin *plugin, char *server, char *command, - char *arguments, char *handler_args, void *handler_pointer) +int my_timer (t_weechat_plugin *plugin, int argc, char **argv, + char *handler_args, void *handler_pointer) { plugin->print (plugin, NULL, NULL, "my timer"); return PLUGIN_RC_OK; @@ -3606,14 +3605,13 @@ char plugin_description[] = "Test plugin for WeeChat"; /* "/double" command manager */ -int double_cmd (t_weechat_plugin *plugin, char *server, - char *command, char *arguments, - char *handler_args, void *handler_pointer) +int double_cmd (t_weechat_plugin *plugin, int argc, char **argv, + char *handler_args, void *handler_pointer) { - if (arguments && arguments[0] && (arguments[0] != '/')) + if (argv[2] && (argv[2][0] != '/')) { - plugin->exec_command (plugin, NULL, NULL, arguments); - plugin->exec_command (plugin, NULL, NULL, arguments); + plugin->exec_command (plugin, NULL, NULL, argv[2]); + plugin->exec_command (plugin, NULL, NULL, argv[2]); } return PLUGIN_RC_OK; } |