summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/de/weechat.de.xml28
-rw-r--r--doc/en/weechat.en.xml30
-rw-r--r--doc/fr/weechat.fr.xml28
-rw-r--r--weechat/doc/de/weechat.de.xml28
-rw-r--r--weechat/doc/en/weechat.en.xml30
-rw-r--r--weechat/doc/fr/weechat.fr.xml28
6 files changed, 80 insertions, 92 deletions
diff --git a/doc/de/weechat.de.xml b/doc/de/weechat.de.xml
index 1172bc86f..31d81c2d7 100644
--- a/doc/de/weechat.de.xml
+++ b/doc/de/weechat.de.xml
@@ -1870,10 +1870,10 @@ plugin->log (plugin, "freenode", "#weechat", "test");
<para>
Beispiel:
<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;
}
...
@@ -2105,13 +2105,12 @@ plugin->msg_handler_add (plugin, "KICK", &amp;msg_kick, NULL, NULL);
<para>
Beispiel:
<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;
}
...
@@ -2199,8 +2198,8 @@ plugin->cmd_handler_add (plugin, "test", "Test command",
<para>
Beispiel:
<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;
@@ -3571,14 +3570,13 @@ char plugin_description[] = "Test plugin for WeeChat";
/* "/double" command manager */
-int double_cmd (t_weechat_plugin *plugin, char *server,
- char *command, char *arguments,
+int double_cmd (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
{
- if (arguments &amp;&amp; arguments[0] &amp;&amp; (arguments[0] != '/'))
+ if (argv[2] &amp;&amp; (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;
}
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", &amp;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 &amp;&amp; arguments[0] &amp;&amp; (arguments[0] != '/'))
+ if (argv[2] &amp;&amp; (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;
}
diff --git a/doc/fr/weechat.fr.xml b/doc/fr/weechat.fr.xml
index ff470635b..b0403d3f9 100644
--- a/doc/fr/weechat.fr.xml
+++ b/doc/fr/weechat.fr.xml
@@ -1921,10 +1921,10 @@ plugin->log (plugin, "freenode", "#weechat", "test");
<para>
Exemple :
<screen>
-int msg_kick (t_weechat_plugin *plugin, char *serveur, char *commande,
- 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, serveur, NULL, "KICK reçu");
+ plugin->print (plugin, argv[0], NULL, "KICK reçu");
return PLUGIN_RC_OK;
}
...
@@ -2171,13 +2171,12 @@ plugin->msg_handler_add (plugin, "KICK", &amp;msg_kick, NULL, NULL);
<para>
Exemple :
<screen>
-int cmd_test (t_weechat_plugin *plugin, char *serveur,
- char *commande, 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, serveur, NULL,
+ plugin->print (plugin, argv[0], NULL,
"commande test, pseudo: %s",
- (arguments) ? arguments : "aucun");
+ (argv[2]) ? argv[2] : "aucun");
return PLUGIN_RC_OK;
}
...
@@ -2271,8 +2270,8 @@ plugin->cmd_handler_add (plugin, "test", "Commande test",
<para>
Exemple :
<screen>
-int mon_timer (t_weechat_plugin *plugin, char *serveur, char *commande,
- char *arguments, char *handler_args, void *handler_pointer)
+int mon_timer (t_weechat_plugin *plugin, int argc, char **argv,
+ char *handler_args, void *handler_pointer)
{
plugin->print (plugin, NULL, NULL, "mon timer");
return PLUGIN_RC_OK;
@@ -3690,14 +3689,13 @@ char plugin_description[] = "Plugin de test pour WeeChat";
/* gestionnaire de commande "/double" */
-int double_cmd (t_weechat_plugin *plugin, char *serveur,
- char *commande, char *arguments,
+int double_cmd (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
{
- if (arguments &amp;&amp; arguments[0] &amp;&amp; (arguments[0] != '/'))
+ if (argv[2] &amp;&amp; (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;
}
diff --git a/weechat/doc/de/weechat.de.xml b/weechat/doc/de/weechat.de.xml
index 1172bc86f..31d81c2d7 100644
--- a/weechat/doc/de/weechat.de.xml
+++ b/weechat/doc/de/weechat.de.xml
@@ -1870,10 +1870,10 @@ plugin->log (plugin, "freenode", "#weechat", "test");
<para>
Beispiel:
<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;
}
...
@@ -2105,13 +2105,12 @@ plugin->msg_handler_add (plugin, "KICK", &amp;msg_kick, NULL, NULL);
<para>
Beispiel:
<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;
}
...
@@ -2199,8 +2198,8 @@ plugin->cmd_handler_add (plugin, "test", "Test command",
<para>
Beispiel:
<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;
@@ -3571,14 +3570,13 @@ char plugin_description[] = "Test plugin for WeeChat";
/* "/double" command manager */
-int double_cmd (t_weechat_plugin *plugin, char *server,
- char *command, char *arguments,
+int double_cmd (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
{
- if (arguments &amp;&amp; arguments[0] &amp;&amp; (arguments[0] != '/'))
+ if (argv[2] &amp;&amp; (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;
}
diff --git a/weechat/doc/en/weechat.en.xml b/weechat/doc/en/weechat.en.xml
index ae8361f32..6c703a0b4 100644
--- a/weechat/doc/en/weechat.en.xml
+++ b/weechat/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", &amp;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 &amp;&amp; arguments[0] &amp;&amp; (arguments[0] != '/'))
+ if (argv[2] &amp;&amp; (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;
}
diff --git a/weechat/doc/fr/weechat.fr.xml b/weechat/doc/fr/weechat.fr.xml
index ff470635b..b0403d3f9 100644
--- a/weechat/doc/fr/weechat.fr.xml
+++ b/weechat/doc/fr/weechat.fr.xml
@@ -1921,10 +1921,10 @@ plugin->log (plugin, "freenode", "#weechat", "test");
<para>
Exemple :
<screen>
-int msg_kick (t_weechat_plugin *plugin, char *serveur, char *commande,
- 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, serveur, NULL, "KICK reçu");
+ plugin->print (plugin, argv[0], NULL, "KICK reçu");
return PLUGIN_RC_OK;
}
...
@@ -2171,13 +2171,12 @@ plugin->msg_handler_add (plugin, "KICK", &amp;msg_kick, NULL, NULL);
<para>
Exemple :
<screen>
-int cmd_test (t_weechat_plugin *plugin, char *serveur,
- char *commande, 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, serveur, NULL,
+ plugin->print (plugin, argv[0], NULL,
"commande test, pseudo: %s",
- (arguments) ? arguments : "aucun");
+ (argv[2]) ? argv[2] : "aucun");
return PLUGIN_RC_OK;
}
...
@@ -2271,8 +2270,8 @@ plugin->cmd_handler_add (plugin, "test", "Commande test",
<para>
Exemple :
<screen>
-int mon_timer (t_weechat_plugin *plugin, char *serveur, char *commande,
- char *arguments, char *handler_args, void *handler_pointer)
+int mon_timer (t_weechat_plugin *plugin, int argc, char **argv,
+ char *handler_args, void *handler_pointer)
{
plugin->print (plugin, NULL, NULL, "mon timer");
return PLUGIN_RC_OK;
@@ -3690,14 +3689,13 @@ char plugin_description[] = "Plugin de test pour WeeChat";
/* gestionnaire de commande "/double" */
-int double_cmd (t_weechat_plugin *plugin, char *serveur,
- char *commande, char *arguments,
+int double_cmd (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
{
- if (arguments &amp;&amp; arguments[0] &amp;&amp; (arguments[0] != '/'))
+ if (argv[2] &amp;&amp; (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;
}