1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 10:43:13 +02:00

Add new plugin "relay", new function "string_format_size" in plugin API

This commit is contained in:
Sebastien Helleu
2008-12-10 17:08:56 +01:00
parent 09fdd1ace3
commit 20a1360bd8
55 changed files with 4019 additions and 447 deletions
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<command>/relay</command>
<programlisting>
relay control
Open buffer with relay clients list
</programlisting>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<row>
<entry>infolist</entry>
<entry>relay</entry>
<entry>list of relay clients</entry>
</row>
+118
View File
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<command>relay.color.status_active</command>: text color for "connected" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: lightblue)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_auth_failed</command>: text color for "authentication failed" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: lightred)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_connecting</command>: text color for "connecting" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: yellow)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_disconnected</command>: text color for "disconnected" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: lightred)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_waiting_auth</command>: text color for "waiting authentication" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: brown)</para>
</listitem>
</itemizedlist>
<command>relay.color.text</command>: text color
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: default)</para>
</listitem>
</itemizedlist>
<command>relay.color.text_bg</command>: background color
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: default)</para>
</listitem>
</itemizedlist>
<command>relay.color.text_selected</command>: text color of selected client line
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: white)</para>
</listitem>
</itemizedlist>
<command>relay.look.auto_open_buffer</command>: auto open relay buffer when a new client is connecting
<itemizedlist>
<listitem>
<para>type: boolean</para>
</listitem>
<listitem>
<para>values: on, off (default value: on)</para>
</listitem>
</itemizedlist>
<command>relay.network.listen_port_range</command>: port number (or range of ports) that relay plugin listens on (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015)
<itemizedlist>
<listitem>
<para>type: string</para>
</listitem>
<listitem>
<para>values: any string (default value: '22373-22400')</para>
</listitem>
</itemizedlist>
<command>relay.network.timeout</command>: timeout for relay request (in seconds)
<itemizedlist>
<listitem>
<para>type: integer</para>
</listitem>
<listitem>
<para>values: 5 .. 2147483647 (default value: 300)</para>
</listitem>
</itemizedlist>
+4 -4
View File
@@ -66,10 +66,10 @@ my %plugin_list = ("weechat" => "co", "alias" => "",
"aspell" => "o", "charset" => "co",
"demo" => "co", "fifo" => "co",
"irc" => "co", "logger" => "co",
"notify" => "co", "perl" => "",
"python" => "", "ruby" => "",
"lua" => "", "tcl" => "",
"xfer" => "co");
"notify" => "co", "relay" => "co",
"perl" => "", "python" => "",
"ruby" => "", "lua" => "",
"tcl" => "", "xfer" => "co");
# options to ignore
my @ignore_options = ("aspell\\.dict\\..*",
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<command>/relay</command>
<programlisting>
relay control
Open buffer with relay clients list
</programlisting>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<row>
<entry>infolist</entry>
<entry>relay</entry>
<entry>list of relay clients</entry>
</row>
+118
View File
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<command>relay.color.status_active</command>: text color for "connected" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: lightblue)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_auth_failed</command>: text color for "authentication failed" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: lightred)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_connecting</command>: text color for "connecting" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: yellow)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_disconnected</command>: text color for "disconnected" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: lightred)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_waiting_auth</command>: text color for "waiting authentication" status
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: brown)</para>
</listitem>
</itemizedlist>
<command>relay.color.text</command>: text color
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: default)</para>
</listitem>
</itemizedlist>
<command>relay.color.text_bg</command>: background color
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: default)</para>
</listitem>
</itemizedlist>
<command>relay.color.text_selected</command>: text color of selected client line
<itemizedlist>
<listitem>
<para>type: color</para>
</listitem>
<listitem>
<para>values: a color name (default value: white)</para>
</listitem>
</itemizedlist>
<command>relay.look.auto_open_buffer</command>: auto open relay buffer when a new client is connecting
<itemizedlist>
<listitem>
<para>type: boolean</para>
</listitem>
<listitem>
<para>values: on, off (default value: on)</para>
</listitem>
</itemizedlist>
<command>relay.network.listen_port_range</command>: port number (or range of ports) that relay plugin listens on (syntax: a single port, ie. 5000 or a port range, ie. 5000-5015)
<itemizedlist>
<listitem>
<para>type: string</para>
</listitem>
<listitem>
<para>values: any string (default value: '22373-22400')</para>
</listitem>
</itemizedlist>
<command>relay.network.timeout</command>: timeout for relay request (in seconds)
<itemizedlist>
<listitem>
<para>type: integer</para>
</listitem>
<listitem>
<para>values: 5 .. 2147483647 (default value: 300)</para>
</listitem>
</itemizedlist>
+62 -11
View File
@@ -722,7 +722,9 @@ char *weechat_string_strip (
</note>
<para>
Example:
<screen>char *str = weechat_strip (string, " ", 0, 1); /* remove spaces at end of string */</screen>
<screen>
char *str = weechat_string_strip (string, " ", 0, 1); /* remove spaces at end of string */
</screen>
</para>
</section>
@@ -857,7 +859,7 @@ char **weechat_string_explode (
</note>
<para>
Examples:
<screen>
<screen>
char **argv;
int argc;
argv = weechat_string_explode ("abc de fghi", " ", 0, 0, &amp;argc);
@@ -877,7 +879,7 @@ argv = weechat_string_explode ("abc de fghi", " ", 1, 0, &amp;argc);
argc == 3
*/
weechat_string_free_exploded (argv);
</screen>
</screen>
</para>
</section>
@@ -909,13 +911,13 @@ void weechat_string_free_exploded (char **exploded_string);
</para>
<para>
Example:
<screen>
<screen>
char *argv;
int argc;
argv = weechat_string_explode (string, " ", 0, 0, &amp;argc);
...
weechat_string_free_exploded (, argv);
</screen>
</screen>
</para>
</section>
@@ -959,13 +961,13 @@ char *weechat_string_build_with_exploded (
</note>
<para>
Example:
<screen>
<screen>
char **argv;
int argc;
argv = weechat_string_explode ("abc def ghi", " ", 0, 0, &amp;argc);
char *string = weechat_string_build_with_exploded (argv, ";");
/* string == "abc;def;ghi" */
</screen>
</screen>
</para>
</section>
@@ -1040,11 +1042,60 @@ void weechat_string_free_splitted_command (char **splitted_command);
</para>
<para>
Example:
<screen>
<screen>
char **argv = weechat_string_split_command ("/command1;/command2", ';');
...
weechat_string_free_splitted_command (argv);
</screen>
</screen>
</para>
</section>
<section id="secPluginCApi_weechat_string_format_size">
<title>weechat_string_format_size</title>
<para>
Prototype:
<programlisting>
char *weechat_string_format_size (unsigned long size);
</programlisting>
</para>
<para>
Build a string with formated size and translated unit.
</para>
<para>
Arguments:
<itemizedlist>
<listitem>
<para>
<option>size</option>: size
</para>
</listitem>
</itemizedlist>
</para>
<para>
Return value: string with formated size and translated unit.
</para>
<note>
<para>
Result has to be free by a call to "free" after use.
</para>
</note>
<para>
Example:
<screen>
char *str = weechat_string_format_size (0); /* str == "0 byte" (english locale) */
if (str)
free (str);
char *str = weechat_string_format_size (200); /* str == "200 bytes" (english locale) */
if (str)
free (str);
char *str = weechat_string_format_size (1536); /* str == "1.5 KB" (english locale) */
if (str)
free (str);
char *str = weechat_string_format_size (2097152); /* str == "2 MB" (english locale) */
if (str)
free (str);
</screen>
</para>
</section>
@@ -1123,10 +1174,10 @@ int weechat_utf8_is_valid (const char *string, char **error);
</para>
<para>
Example:
<screen>
<screen>
char *error;
if (weechat_utf8_is_valid (string, &amp;error)) ...
</screen>
</screen>
</para>
</section>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<command>/relay</command>
<programlisting>
contrôle du relai
Ouverture du tampon avec la liste des clients pour le relai
</programlisting>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<row>
<entry>infolist</entry>
<entry>relay</entry>
<entry>liste des clients pour le relai</entry>
</row>
+118
View File
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
********* WARNING! *********
This file is autogenerated with docgen.pl script. *** DO NOT EDIT! ***
docgen.pl builds XML doc files to include in many languages
-->
<command>relay.color.status_active</command>: couleur du texte pour le statut "connecté"
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: lightblue)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_auth_failed</command>: couleur du texte pour le statut "échec auth"
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: lightred)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_connecting</command>: couleur du texte pour le statut "connexion"
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: yellow)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_disconnected</command>: couleur du texte pour le statut "déconnecté"
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: lightred)</para>
</listitem>
</itemizedlist>
<command>relay.color.status_waiting_auth</command>: couleur du texte pour le statut "attente auth"
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: brown)</para>
</listitem>
</itemizedlist>
<command>relay.color.text</command>: couleur du texte
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: default)</para>
</listitem>
</itemizedlist>
<command>relay.color.text_bg</command>: couleur du fond
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: default)</para>
</listitem>
</itemizedlist>
<command>relay.color.text_selected</command>: couleur du texte pour la ligne client sélectionnée
<itemizedlist>
<listitem>
<para>type: couleur</para>
</listitem>
<listitem>
<para>valeurs: un nom de couleur (valeur par défaut: white)</para>
</listitem>
</itemizedlist>
<command>relay.look.auto_open_buffer</command>: ouvrir automatiquement le tampon des clients lorsqu'un nouveau client est ajouté à la liste
<itemizedlist>
<listitem>
<para>type: booléen</para>
</listitem>
<listitem>
<para>valeurs: on, off (valeur par défaut: on)</para>
</listitem>
</itemizedlist>
<command>relay.network.listen_port_range</command>: numéro de port (ou intervalle de ports) sur lesquels écoute l'extension relay (syntaxe: un port simple, par exemple 5000, un intervalle de ports, par exemple 5000-5015)
<itemizedlist>
<listitem>
<para>type: chaîne</para>
</listitem>
<listitem>
<para>valeurs: toute chaîne (valeur par défaut: '22373-22400')</para>
</listitem>
</itemizedlist>
<command>relay.network.timeout</command>: délai d'attente pour la requête relai (en secondes)
<itemizedlist>
<listitem>
<para>type: entier</para>
</listitem>
<listitem>
<para>valeurs: 5 .. 2147483647 (valeur par défaut: 300)</para>
</listitem>
</itemizedlist>
+3
View File
@@ -10,6 +10,7 @@
<!ENTITY notify_commands.xml SYSTEM "autogen/notify_commands.xml">
<!ENTITY perl_commands.xml SYSTEM "autogen/perl_commands.xml">
<!ENTITY python_commands.xml SYSTEM "autogen/python_commands.xml">
<!ENTITY relay_commands.xml SYSTEM "autogen/relay_commands.xml">
<!ENTITY ruby_commands.xml SYSTEM "autogen/ruby_commands.xml">
<!ENTITY tcl_commands.xml SYSTEM "autogen/tcl_commands.xml">
<!ENTITY weechat_commands.xml SYSTEM "autogen/weechat_commands.xml">
@@ -21,6 +22,7 @@
<!ENTITY charset_options.xml SYSTEM "autogen/charset_options.xml">
<!ENTITY irc_options.xml SYSTEM "autogen/irc_options.xml">
<!ENTITY logger_options.xml SYSTEM "autogen/logger_options.xml">
<!ENTITY relay_options.xml SYSTEM "autogen/relay_options.xml">
<!ENTITY weechat_options.xml SYSTEM "autogen/weechat_options.xml">
<!ENTITY xfer_options.xml SYSTEM "autogen/xfer_options.xml">
@@ -30,5 +32,6 @@
<!ENTITY fifo_infos.xml SYSTEM "autogen/fifo_infos.xml">
<!ENTITY irc_infos.xml SYSTEM "autogen/irc_infos.xml">
<!ENTITY logger_infos.xml SYSTEM "autogen/logger_infos.xml">
<!ENTITY relay_infos.xml SYSTEM "autogen/relay_infos.xml">
<!ENTITY weechat_infos.xml SYSTEM "autogen/weechat_infos.xml">
<!ENTITY xfer_infos.xml SYSTEM "autogen/xfer_infos.xml">