summaryrefslogtreecommitdiff
path: root/doc/en/weechat.en.xml
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-02-19 10:43:47 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-02-19 10:43:47 +0000
commit3a213f38eca02f158169afd2f140050930f5cdc3 (patch)
treed46434e51141bb415e90afbdd9a76e65a4249549 /doc/en/weechat.en.xml
parent484274d65f27d21e8da1823f36fefd67e8bed67b (diff)
downloadweechat-3a213f38eca02f158169afd2f140050930f5cdc3.zip
Added timer handler for plugins
Diffstat (limited to 'doc/en/weechat.en.xml')
-rw-r--r--doc/en/weechat.en.xml640
1 files changed, 481 insertions, 159 deletions
diff --git a/doc/en/weechat.en.xml b/doc/en/weechat.en.xml
index 74131e960..a4e6f4b60 100644
--- a/doc/en/weechat.en.xml
+++ b/doc/en/weechat.en.xml
@@ -1999,6 +1999,87 @@ plugin->cmd_handler_add (plugin, "test", "Test command",
</para>
</section>
+ <section id="secAPI_timer_handler_add">
+ <title>timer_handler_add</title>
+
+ <para>
+ Prototype:
+ <command>
+ t_plugin_handler *timer_handler_add (t_weechat_plugin
+ *plugin, int interval, t_plugin_handler_func *function,
+ char *handler_args, void *handler_pointer)
+ </command>
+ </para>
+ <para>
+ Add a timer handler which periodically calls a function.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>plugin</option>: pointer to plugin structure
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>interval</option>: interval (in seconds) between
+ two calls of function.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>function</option>: function called
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>handler_args</option>: arguments given to function
+ when called
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>handler_pointer</option>: pointer given to function
+ when called
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: pointer to new message handler.
+ </para>
+ <para>
+ Note: function called has to return one of following values:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>PLUGIN_RC_KO</literal>: function failed
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>PLUGIN_RC_OK</literal>: function successfully
+ completed
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Example:
+<screen>
+int my_timer (t_weechat_plugin *plugin, char *server, char *command,
+ char *arguments, char *handler_args, void *handler_pointer)
+{
+ plugin->print (plugin, NULL, NULL, "my timer");
+ return PLUGIN_RC_OK;
+}
+...
+plugin->timer_handler_add (plugin, 60, &amp;my_timer);
+</screen>
+ </para>
+ </section>
+
<section id="secAPI_handler_remove">
<title>handler_remove</title>
@@ -3324,6 +3405,89 @@ void weechat_plugin_end (t_weechat_plugin *plugin)
</section>
+ <section id="secSyntaxByLanguage">
+ <title>Syntax by language</title>
+
+ <section>
+ <title>Perl</title>
+
+ <para>
+ In a WeeChat Perl script, all API functions and variables are
+ prefixed by "<literal>weechat::</literal>".
+ Example:
+<screen>weechat::register("test", "1.0", "end_test", "WeeChat perl script");</screen>
+ </para>
+
+ </section>
+
+ <section>
+ <title>Python</title>
+
+ <para>
+ A WeeChat Python script has to start by importing weechat:
+ <screen>import weechat</screen>
+ </para>
+
+ <para>
+ All API functions and variables are prefixed by
+ "<literal>weechat.</literal>".
+ Example:
+<screen>weechat.register("test", "1.0", "end_test", "WeeChat python script")</screen>
+ </para>
+
+ </section>
+
+ <section>
+ <title>Ruby</title>
+
+ <para>
+ In a WeeChat Ruby script, all code has to be in functions.
+ So for main code, you have to define a
+ "<literal>weechat_init</literal>" function, which is automatically
+ called when script is loaded by WeeChat. Example:
+<screen>
+def weechat_init
+ Weechat.register("test", "1.0", "end_test", "WeeChat ruby script")
+ Weechat.add_command_handler("command", "my_command")
+ return Weechat::PLUGIN_RC_OK
+end
+
+def my_command(server, args)
+ Weechat.print("my command")
+ return Weechat::PLUGIN_RC_OK
+end
+</screen>
+ </para>
+
+ <para>
+ All API functions are prefixed by
+ "<literal>Weechat.</literal>" and variables by
+ "<literal>Weechat::</literal>".
+ </para>
+
+ </section>
+
+ <section>
+ <title>Lua</title>
+
+ <para>
+ In a WeeChat Lua script, all API functions are prefixed by
+ "<literal>weechat.</literal>".
+ Variables are prefixed by "<literal>weechat.</literal>" and
+ suffixed by "<literal>()</literal>".
+ Example:
+<screen>
+function message_handler(server, args)
+ weechat.print("I am a message handler")
+ return weechat.PLUGIN_RC_OK()
+end
+</screen>
+ </para>
+
+ </section>
+
+ </section>
+
<section id="secWeeChatScriptsAPI">
<title>WeeChat / scripts API</title>
@@ -3333,25 +3497,25 @@ void weechat_plugin_end (t_weechat_plugin *plugin)
<para>
Perl prototype:
<command>
- weechat::register ( name, version, end_function, description );
+ weechat::register(name, version, end_function, description);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.register ( name, version, end_function, description )
+ weechat.register(name, version, end_function, description)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.register ( name, version, end_function, description )
+ Weechat.register(name, version, end_function, description)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.register ( name, version, end_function, description )
+ weechat.register(name, version, end_function, description)
</command>
</para>
<para>
@@ -3393,16 +3557,16 @@ void weechat_plugin_end (t_weechat_plugin *plugin)
Examples:
<screen>
# perl
-weechat::register ("test", "1.0", "end_test", "Test script!");
+weechat::register("test", "1.0", "end_test", "Test script!");
# python
-weechat.register ("test", "1.0", "end_test", "Test script!")
+weechat.register("test", "1.0", "end_test", "Test script!")
# ruby
-Weechat.register ("test", "1.0", "end_test", "Test script!")
+Weechat.register("test", "1.0", "end_test", "Test script!")
-- lua
-weechat.register ("test", "1.0", "end_test", "Test script!")
+weechat.register("test", "1.0", "end_test", "Test script!")
</screen>
</para>
</section>
@@ -3413,25 +3577,25 @@ weechat.register ("test", "1.0", "end_test", "Test script!")
<para>
Perl prototype:
<command>
- weechat::print ( message, [channel, [server]] )
+ weechat::print(message, [channel, [server]])
</command>
</para>
<para>
Python prototype:
<command>
- weechat.prnt ( message, [channel, [server]] )
+ weechat.prnt(message, [channel, [server]])
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.print ( message, [channel, [server]] )
+ Weechat.print(message, [channel, [server]])
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.print ( message, [channel, [server]] )
+ weechat.print(message, [channel, [server]])
</command>
</para>
<para>
@@ -3467,24 +3631,24 @@ weechat.register ("test", "1.0", "end_test", "Test script!")
Examples:
<screen>
# perl
-weechat::print ("message");
-weechat::print ("message", "#weechat");
-weechat::print ("message", "#weechat", "freenode");
+weechat::print("message");
+weechat::print("message", "#weechat");
+weechat::print("message", "#weechat", "freenode");
# python
-weechat.prnt ("message")
-weechat.prnt ("message", "#weechat")
-weechat.prnt ("message", "#weechat", "freenode")
+weechat.prnt("message")
+weechat.prnt("message", "#weechat")
+weechat.prnt("message", "#weechat", "freenode")
# ruby
-Weechat.print ("message")
-Weechat.print ("message", "#weechat")
-Weechat.print ("message", "#weechat", "freenode")
+Weechat.print("message")
+Weechat.print("message", "#weechat")
+Weechat.print("message", "#weechat", "freenode")
-- lua
-weechat.print ("message")
-weechat.print ("message", "#weechat")
-weechat.print ("message", "#weechat", "freenode")
+weechat.print("message")
+weechat.print("message", "#weechat")
+weechat.print("message", "#weechat", "freenode")
</screen>
</para>
</section>
@@ -3495,25 +3659,25 @@ weechat.print ("message", "#weechat", "freenode")
<para>
Perl prototype:
<command>
- weechat::print_infobar ( time, message );
+ weechat::print_infobar(time, message);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.print_infobar ( time, message )
+ weechat.print_infobar(time, message)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.print_infobar ( time, message )
+ Weechat.print_infobar(time, message)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.print_infobar ( time, message )
+ weechat.print_infobar(time, message)
</command>
</para>
<para>
@@ -3542,16 +3706,16 @@ weechat.print ("message", "#weechat", "freenode")
Examples:
<screen>
# perl
-weechat::print_infobar (5, "message");
+weechat::print_infobar(5, "message");
# python
-weechat.print_infobar (5, "message")
+weechat.print_infobar(5, "message")
# ruby
-Weechat.print_infobar (5, "message")
+Weechat.print_infobar(5, "message")
-- lua
-weechat.print_infobar (5, "message")
+weechat.print_infobar(5, "message")
</screen>
</para>
</section>
@@ -3562,25 +3726,25 @@ weechat.print_infobar (5, "message")
<para>
Perl prototype:
<command>
- weechat::log ( message, [channel, [server]] )
+ weechat::log(message, [channel, [server]]);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.log ( message, [channel, [server]] )
+ weechat.log(message, [channel, [server]])
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.log ( message, [channel, [server]] )
+ Weechat.log(message, [channel, [server]])
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.log ( message, [channel, [server]] )
+ weechat.log(message, [channel, [server]])
</command>
</para>
<para>
@@ -3615,16 +3779,16 @@ weechat.print_infobar (5, "message")
Examples:
<screen>
# perl
-weechat::log ("message", "#weechat", "freenode");
+weechat::log("message", "#weechat", "freenode");
# python
-weechat.log ("message", "#weechat", "freenode")
+weechat.log("message", "#weechat", "freenode")
# ruby
-Weechat.log ("message", "#weechat", "freenode")
+Weechat.log("message", "#weechat", "freenode")
-- lua
-weechat.log ("message", "#weechat", "freenode")
+weechat.log("message", "#weechat", "freenode")
</screen>
</para>
</section>
@@ -3635,25 +3799,25 @@ weechat.log ("message", "#weechat", "freenode")
<para>
Perl prototype:
<command>
- weechat::add_message_handler ( message, function );
+ weechat::add_message_handler(message, function);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.add_message_handler ( message, function )
+ weechat.add_message_handler(message, function)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.add_message_handler ( message, function )
+ Weechat.add_message_handler(message, function)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.add_message_handler ( message, function )
+ weechat.add_message_handler(message, function)
</command>
</para>
<para>
@@ -3686,18 +3850,18 @@ weechat.log ("message", "#weechat", "freenode")
Examples:
<screen>
# perl
-weechat::add_message_handler ("privmsg", my_function);
+weechat::add_message_handler ("privmsg", "my_function");
sub my_function
{
- weechat::print ("server=$_[0]\n");
+ weechat::print("server=$_[0]");
($null, $channel, $message) = split ":",$_[1],3;
($mask, $null, $channel) = split " ", $channel;
- weechat::print ("mask=$mask, channel=$channel, msg=$message\n");
+ weechat::print("mask=$mask, channel=$channel, msg=$message");
return weechat::PLUGIN_RC_OK;
}
# python
-weechat.add_message_handler ("privmsg", my_function)
+weechat.add_message_handler ("privmsg", "my_function")
def my_function(server, args):
weechat.prnt("server="+server)
null, channel, message = string.split(args, ":", 2)
@@ -3706,11 +3870,11 @@ def my_function(server, args):
return weechat.PLUGIN_RC_OK
# ruby
+Weechat.add_message_handler("privmsg", "my_function")
def my_function(server, args)
Weechat.print("server=#{server}, args=#{args}")
return Weechat::PLUGIN_RC_OK
end
-Weechat.add_message_handler ("privmsg", "my_function")
-- lua
weechat.add_message_handler ("privmsg", "my_function")
@@ -3721,9 +3885,8 @@ end
</screen>
</para>
<para>
- Note: function called when message is received has to return one
- of following values (prefixed by weechat::" for Perl, "weechat."
- for Python or "Weechat." for Ruby):
+ Note: function called when message is received has to return
+ one of following values:
<itemizedlist>
<listitem>
<para>
@@ -3764,33 +3927,33 @@ end
<para>
Perl prototype:
<command>
- weechat::add_command_handler ( command, function,
+ weechat::add_command_handler(command, function,
[description, arguments, arguments_description,
- completion_template] );
+ completion_template]);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.add_command_handler ( command, function,
+ weechat.add_command_handler(command, function,
[description, arguments, arguments_description,
- completion_template] )
+ completion_template])
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.add_command_handler ( command, function,
+ Weechat.add_command_handler(command, function,
[description, arguments, arguments_description,
- completion_template] )
+ completion_template])
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.add_command_handler ( command, function,
+ weechat.add_command_handler(command, function,
[description, arguments, arguments_description,
- completion_template] )
+ completion_template])
</command>
</para>
<para>
@@ -3843,28 +4006,28 @@ end
Examples:
<screen>
# perl
-weechat::add_command_handler ("command", my_command);
+weechat::add_command_handler("command", "my_command");
sub my_command
{
- weechat::print("server= $_[0], args: $_[1]\n");
+ weechat::print("server= $_[0], args: $_[1]");
return weechat::PLUGIN_RC_OK;
}
# python
-weechat.add_command_handler ("command", my_command)
+weechat.add_command_handler("command", "my_command")
def my_command(server, args):
weechat.prnt("server="+server+", args="+args)
return weechat.PLUGIN_RC_OK
# ruby
+Weechat.add_command_handler("command", "my_command")
def my_command(server, args)
Weechat.print("server=#{server}, args=#{args}")
return Weechat::PLUGIN_RC_OK
end
-Weechat.add_command_handler ("command", "my_command")
-- lua
-weechat.add_command_handler ("command", "my_command")
+weechat.add_command_handler("command", "my_command")
def my_command(server, args)
weechat.print("server="..server..", args="..args)
return weechat.PLUGIN_RC_OK()
@@ -3872,9 +4035,8 @@ end
</screen>
</para>
<para>
- Notes: function called when command is executed has to return one
- of following values (prefixed by "weechat::" for Perl, "weechat."
- for Python or "Weechat." for Ruby):
+ Notes: function called when command is executed has to return
+ one of following values:
<itemizedlist>
<listitem>
<para>
@@ -3892,34 +4054,133 @@ end
</section>
<section>
+ <title>add_timer_handler</title>
+
+ <para>
+ Perl prototype:
+ <command>
+ weechat::add_timer_handler(message, function);
+ </command>
+ </para>
+ <para>
+ Python prototype:
+ <command>
+ weechat.add_timer_handler(message, function)
+ </command>
+ </para>
+ <para>
+ Ruby prototype:
+ <command>
+ Weechat.add_timer_handler(message, function)
+ </command>
+ </para>
+ <para>
+ Lua prototype:
+ <command>
+ weechat.add_timer_handler(message, function)
+ </command>
+ </para>
+ <para>
+ Add a timer handler which periodically calls a function.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>interval</option>: interval (in seconds) between
+ two calls of function.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>function</option>: function called
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: 1 if success, 0 if an error occurred.
+ </para>
+ <para>
+ Examples:
+<screen>
+# perl
+weechat::add_timer_handler(60, "my_timer");
+sub my_timer
+{
+ weechat::print("this is timer handler");
+ return weechat::PLUGIN_RC_OK;
+}
+
+# python
+weechat.add_timer_handler(60, "my_timer")
+def my_timer(server, args):
+ weechat.prnt("this is timer handler")
+ return weechat.PLUGIN_RC_OK
+
+# ruby
+Weechat.add_timer_handler(60, "my_timer")
+def my_timer(server, args)
+ Weechat.print("this is timer handler")
+ return Weechat::PLUGIN_RC_OK
+end
+
+-- lua
+weechat.add_timer_handler(60, "my_timer")
+function my_timer(server, args)
+ weechat.print("this is timer handler)
+ return weechat.PLUGIN_RC_OK()
+end
+</screen>
+ </para>
+ <para>
+ Note: function called has to return one of following values:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>PLUGIN_RC_KO</literal>: function failed
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>PLUGIN_RC_OK</literal>: function successfully
+ completed
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section>
<title>remove_handler</title>
<para>
Perl prototype:
<command>
- weechat::remove_handler ( name, function );
+ weechat::remove_handler(name, function);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.remove_handler ( name, function )
+ weechat.remove_handler(name, function)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.remove_handler ( name, function )
+ Weechat.remove_handler(name, function)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.remove_handler ( name, function )
+ weechat.remove_handler(name, function)
</command>
</para>
<para>
- Remove a handler.
+ Remove a message or command handler.
</para>
<para>
Arguments:
@@ -3943,16 +4204,77 @@ end
Examples:
<screen>
# perl
-weechat::remove_handler ("command", my_command);
+weechat::remove_handler("command", "my_command");
+
+# python
+weechat.remove_handler("command", "my_command")
+
+# ruby
+Weechat.remove_handler("command", "my_command")
+
+-- lua
+weechat.remove_handler("command", "my_command")
+</screen>
+ </para>
+ </section>
+
+ <section>
+ <title>remove_timer_handler</title>
+
+ <para>
+ Perl prototype:
+ <command>
+ weechat::remove_timer_handler(function);
+ </command>
+ </para>
+ <para>
+ Python prototype:
+ <command>
+ weechat.remove_timer_handler(function)
+ </command>
+ </para>
+ <para>
+ Ruby prototype:
+ <command>
+ Weechat.remove_timer_handler(function)
+ </command>
+ </para>
+ <para>
+ Lua prototype:
+ <command>
+ weechat.remove_timer_handler(function)
+ </command>
+ </para>
+ <para>
+ Remove a timer handler.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>function</option>: function
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: 1 if success, 0 if an error occurred.
+ </para>
+ <para>
+ Examples:
+<screen>
+# perl
+weechat::remove_timer_handler("my_timer");
# python
-weechat.remove_handler ("command", my_command)
+weechat.remove_timer_handler("my_timer")
# ruby
-Weechat.remove_handler ("command", my_command)
+Weechat.remove_timer_handler("my_timer")
-- lua
-weechat.remove_handler ("command", "my_command")
+weechat.remove_timer_handler("my_timer")
</screen>
</para>
</section>
@@ -3963,25 +4285,25 @@ weechat.remove_handler ("command", "my_command")
<para>
Perl prototype:
<command>
- weechat::command ( command, [channel, [server]] );
+ weechat::command(command, [channel, [server]]);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.command ( command, [channel, [server]] )
+ weechat.command(command, [channel, [server]])
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.command ( command, [channel, [server]] )
+ Weechat.command(command, [channel, [server]])
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.command ( command, [channel, [server]] )
+ weechat.command(command, [channel, [server]])
</command>
</para>
<para>
@@ -4016,24 +4338,24 @@ weechat.remove_handler ("command", "my_command")
Examples:
<screen>
# perl
-weechat::command ("hello everybody!");
-weechat::command ("/kick toto please leave this channel", "#weechat");
-weechat::command ("/nick newnick", "", "freenode");
+weechat::command("hello everybody!");
+weechat::command("/kick toto please leave this channel", "#weechat");
+weechat::command("/nick newnick", "", "freenode");
# python
-weechat.command ("hello everybody!")
-weechat.command ("/kick toto please leave this channel", "#weechat")
-weechat.command ("/nick newnick", "", "freenode")
+weechat.command("hello everybody!")
+weechat.command("/kick toto please leave this channel", "#weechat")
+weechat.command("/nick newnick", "", "freenode")
# ruby
-Weechat.command ("hello everybody!")
-Weechat.command ("/kick toto please leave this channel", "#weechat")
-Weechat.command ("/nick newnick", "", "freenode")
+Weechat.command("hello everybody!")
+Weechat.command("/kick toto please leave this channel", "#weechat")
+Weechat.command("/nick newnick", "", "freenode")
-- lua
-weechat.command ("hello everybody!")
-weechat.command ("/kick toto please leave this channel", "#weechat")
-weechat.command ("/nick newnick", "", "freenode")
+weechat.command("hello everybody!")
+weechat.command("/kick toto please leave this channel", "#weechat")
+weechat.command("/nick newnick", "", "freenode")
</screen>
</para>
</section>
@@ -4044,25 +4366,25 @@ weechat.command ("/nick newnick", "", "freenode")
<para>
Perl prototype:
<command>
- weechat::get_info ( name, [server] );
+ weechat::get_info(name, [server]);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.get_info ( name, [server] )
+ weechat.get_info(name, [server])
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.get_info ( name, [server] )
+ Weechat.get_info(name, [server])
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.get_info ( name, [server] )
+ weechat.get_info(name, [server])
</command>
</para>
<para>
@@ -4097,16 +4419,16 @@ $version = get_info("version");
$nick = get_info("nick", "freenode");
# python
-version = weechat.get_info ("version")
-nick = weechat.get_info ("nick", "freenode")
+version = weechat.get_info("version")
+nick = weechat.get_info("nick", "freenode")
# ruby
-version = Weechat.get_info ("version")
-nick = Weechat.get_info ("nick", "freenode")
+version = Weechat.get_info("version")
+nick = Weechat.get_info("nick", "freenode")
-- lua
-version = weechat.get_info ("version")
-nick = weechat.get_info ("nick", "freenode")
+version = weechat.get_info("version")
+nick = weechat.get_info("nick", "freenode")
</screen>
</para>
</section>
@@ -4117,25 +4439,25 @@ nick = weechat.get_info ("nick", "freenode")
<para>
Perl prototype:
<command>
- weechat::get_dcc_info ( );
+ weechat::get_dcc_info();
</command>
</para>
<para>
Python prototype:
<command>
- weechat.get_dcc_info ( )
+ weechat.get_dcc_info()
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.get_dcc_info ( )
+ Weechat.get_dcc_info()
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.get_dcc_info ( )
+ weechat.get_dcc_info()
</command>
</para>
<para>
@@ -4222,25 +4544,25 @@ end
<para>
Perl prototype:
<command>
- weechat::get_server_info ( );
+ weechat::get_server_info();
</command>
</para>
<para>
Python prototype:
<command>
- weechat.get_server_info ( )
+ weechat.get_server_info()
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.get_server_info ( )
+ Weechat.get_server_info()
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.get_server_info ( )
+ weechat.get_server_info()
</command>
</para>
<para>
@@ -4327,25 +4649,25 @@ end
<para>
Perl prototype:
<command>
- weechat::get_channel_info ( server );
+ weechat::get_channel_info(server);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.get_channel_info ( server )
+ weechat.get_channel_info(server)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.get_channel_info ( server )
+ Weechat.get_channel_info(server)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.get_channel_info ( server )
+ weechat.get_channel_info(server)
</command>
</para>
<para>
@@ -4432,25 +4754,25 @@ end
<para>
Perl prototype:
<command>
- weechat::get_nick_info ( server, channel );
+ weechat::get_nick_info(server, channel);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.get_nick_info ( server, channel )
+ weechat.get_nick_info(server, channel)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.get_nick_info ( server, channel )
+ Weechat.get_nick_info(server, channel)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.get_nick_info ( server, channel )
+ weechat.get_nick_info(server, channel)
</command>
</para>
<para>
@@ -4537,25 +4859,25 @@ end
<para>
Perl prototype:
<command>
- weechat::get_config ( option );
+ weechat::get_config(option);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.get_config ( option )
+ weechat.get_config(option)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.get_config ( option )
+ Weechat.get_config(option)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.get_config ( option )
+ weechat.get_config(option)
</command>
</para>
<para>
@@ -4578,20 +4900,20 @@ end
Examples:
<screen>
# perl
-$value1 = weechat::get_config ("look_nicklist");
-$value2 = weechat::get_config ("freenode.server_autojoin");
+$value1 = weechat::get_config("look_nicklist");
+$value2 = weechat::get_config("freenode.server_autojoin");
# python
-value1 = weechat.get_config ("look_nicklist")
-value2 = weechat.get_config ("freenode.server_autojoin")
+value1 = weechat.get_config("look_nicklist")
+value2 = weechat.get_config("freenode.server_autojoin")
# ruby
-value1 = Weechat.get_config ("look_nicklist")
-value2 = Weechat.get_config ("freenode.server_autojoin")
+value1 = Weechat.get_config("look_nicklist")
+value2 = Weechat.get_config("freenode.server_autojoin")
-- lua
-value1 = weechat.get_config ("look_nicklist")
-value2 = weechat.get_config ("freenode.server_autojoin")
+value1 = weechat.get_config("look_nicklist")
+value2 = weechat.get_config("freenode.server_autojoin")
</screen>
</para>
</section>
@@ -4602,25 +4924,25 @@ value2 = weechat.get_config ("freenode.server_autojoin")
<para>
Perl prototype:
<command>
- weechat::set_config ( option, value );
+ weechat::set_config(option, value);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.set_config ( option, value )
+ weechat.set_config(option, value)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.set_config ( option, value )
+ Weechat.set_config(option, value)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.set_config ( option, value )
+ weechat.set_config(option, value)
</command>
</para>
<para>
@@ -4649,20 +4971,20 @@ value2 = weechat.get_config ("freenode.server_autojoin")
Examples:
<screen>
# perl
-weechat::set_config ("look_nicklist", "off");
-weechat::set_config ("freenode.server_autojoin, "#weechat");
+weechat::set_config("look_nicklist", "off");
+weechat::set_config("freenode.server_autojoin, "#weechat");
# python
-weechat.set_config ("look_nicklist", "off")
-weechat.set_config ("freenode.server_autojoin, "#weechat")
+weechat.set_config("look_nicklist", "off")
+weechat.set_config("freenode.server_autojoin, "#weechat")
# ruby
-Weechat.set_config ("look_nicklist", "off")
-Weechat.set_config ("freenode.server_autojoin, "#weechat")
+Weechat.set_config("look_nicklist", "off")
+Weechat.set_config("freenode.server_autojoin, "#weechat")
-- lua
-weechat.set_config ("look_nicklist", "off")
-weechat.set_config ("freenode.server_autojoin, "#weechat")
+weechat.set_config("look_nicklist", "off")
+weechat.set_config("freenode.server_autojoin, "#weechat")
</screen>
</para>
</section>
@@ -4673,25 +4995,25 @@ weechat.set_config ("freenode.server_autojoin, "#weechat")
<para>
Perl prototype:
<command>
- weechat::get_plugin_config ( option );
+ weechat::get_plugin_config(option);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.get_plugin_config ( option )
+ weechat.get_plugin_config(option)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.get_plugin_config ( option )
+ Weechat.get_plugin_config(option)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.get_plugin_config ( option )
+ weechat.get_plugin_config(option)
</command>
</para>
<para>
@@ -4717,16 +5039,16 @@ weechat.set_config ("freenode.server_autojoin, "#weechat")
Examples :
<screen>
# perl
-$value = weechat::get_plugin_config ("my_var");
+$value = weechat::get_plugin_config("my_var");
# python
-value = weechat.get_plugin_config ("my_var")
+value = weechat.get_plugin_config("my_var")
# ruby
-value = Weechat.get_plugin_config ("my_var")
+value = Weechat.get_plugin_config("my_var")
-- lua
-value = weechat.get_plugin_config ("my_var")
+value = weechat.get_plugin_config("my_var")
</screen>
</para>
</section>
@@ -4737,25 +5059,25 @@ value = weechat.get_plugin_config ("my_var")
<para>
Perl prototype:
<command>
- weechat::set_plugin_config ( option, value );
+ weechat::set_plugin_config(option, value);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.set_plugin_config ( option, value )
+ weechat.set_plugin_config(option, value)
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.set_plugin_config ( option, value )
+ Weechat.set_plugin_config(option, value)
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.set_plugin_config ( option, value )
+ weechat.set_plugin_config(option, value)
</command>
</para>
<para>
@@ -4787,16 +5109,16 @@ value = weechat.get_plugin_config ("my_var")
Examples:
<screen>
# perl
-weechat::set_plugin_config ("my_var", "value");
+weechat::set_plugin_config("my_var", "value");
# python
-weechat.set_plugin_config ("my_var", "value")
+weechat.set_plugin_config("my_var", "value")
# ruby
-Weechat.set_plugin_config ("my_var", "value")
+Weechat.set_plugin_config("my_var", "value")
-- lua
-weechat.set_plugin_config ("my_var", "value")
+weechat.set_plugin_config("my_var", "value")
</screen>
</para>
</section>