summaryrefslogtreecommitdiff
path: root/doc/en/weechat.en.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/en/weechat.en.xml')
-rw-r--r--doc/en/weechat.en.xml278
1 files changed, 248 insertions, 30 deletions
diff --git a/doc/en/weechat.en.xml b/doc/en/weechat.en.xml
index 18cb123be..5104eceb7 100644
--- a/doc/en/weechat.en.xml
+++ b/doc/en/weechat.en.xml
@@ -509,6 +509,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
+ <entry>Ctrl + T</entry>
+ <entry>
+ Transpose chars
+ </entry>
+ </row>
+ <row>
<entry>Ctrl + U</entry>
<entry>
Delete from cursor until beginning of command line
@@ -521,7 +527,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
- <entry>Backspace</entry>
+ <entry>Ctrl + Y</entry>
+ <entry>
+ Paste clipboard content
+ </entry>
+ </row>
+ <row>
+ <entry>Backspace / Ctrl + H</entry>
<entry>
Delete previous char in command line
</entry>
@@ -533,7 +545,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
- <entry>Tab</entry>
+ <entry>Tab / Shift + Tab</entry>
<entry>
Complete command or nick
(Tab again: find next completion)
@@ -546,7 +558,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
- <entry>Enter</entry>
+ <entry>Enter / Ctrl + J / Ctrl + M</entry>
<entry>
Execute command or send message
</entry>
@@ -1260,6 +1272,129 @@ fi
<section id="secAPIFunctions">
<title>API functions</title>
+ <section id="secAPI_set_charset">
+ <title>set_charset</title>
+
+ <para>
+ Prototype:
+ <command>
+ void set_charset (t_weechat_plugin *plugin, char *charset)
+ </command>
+ </para>
+ <para>
+ Set new plugin charset.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>plugin</option>: pointer to plugin structure
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>charset</option>: new charset to use
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Example:
+ <screen>plugin->set_charset (plugin, "ISO-8859-1");</screen>
+ </para>
+ </section>
+
+ <section id="secAPI_iconv_to_internal">
+ <title>iconv_to_internal</title>
+
+ <para>
+ Prototype:
+ <command>
+ void iconv_to_internal (t_weechat_plugin *plugin, char *charset,
+ char *string)
+ </command>
+ </para>
+ <para>
+ Convert string to WeeChat internal charset (UTF-8).
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>plugin</option>: pointer to plugin structure
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>charset</option>: charset to convert
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>string</option>: string to convert
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: converted string.
+ </para>
+ <para>
+ Note: result has to be free by a call to "free" after use.
+ </para>
+ <para>
+ Example:
+ <screen>char *str = plugin->iconv_to_internal (plugin, "ISO-8859-1", "iso string: é à");</screen>
+ </para>
+ </section>
+
+ <section id="secAPI_iconv_from_internal">
+ <title>iconv_from_internal</title>
+
+ <para>
+ Prototype:
+ <command>
+ void iconv_from_internal (t_weechat_plugin *plugin, char *charset,
+ char *string)
+ </command>
+ </para>
+ <para>
+ Convert string from internal WeeChat charset (UTF-8) to another.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>plugin</option>: pointer to plugin structure
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>charset</option>: target charset
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>string</option>: string to convert
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: converted string.
+ </para>
+ <para>
+ Note: result has to be free by a call to "free" after use.
+ </para>
+ <para>
+ Example:
+ <screen>char *str = plugin->iconv_from_internal (plugin, "ISO-8859-1", "utf-8 string: é à");</screen>
+ </para>
+ </section>
+
<section id="secAPI_ascii_strcasecmp">
<title>ascii_strcasecmp</title>
@@ -4670,25 +4805,25 @@ end
<para>
Perl prototype:
<command>
- weechat::register(name, version, end_function, description);
+ weechat::register(name, version, end_function, description, [charset]);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.register(name, version, end_function, description)
+ weechat.register(name, version, end_function, description, [charset])
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.register(name, version, end_function, description)
+ Weechat.register(name, version, end_function, description, [charset])
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.register(name, version, end_function, description)
+ weechat.register(name, version, end_function, description, [charset])
</command>
</para>
<para>
@@ -4721,6 +4856,12 @@ end
<option>description</option>: short description of script
</para>
</listitem>
+ <listitem>
+ <para>
+ <option>charset</option>: charset used by script, you should
+ set this if script is not written with UTF-8
+ </para>
+ </listitem>
</itemizedlist>
</para>
<para>
@@ -4730,16 +4871,77 @@ end
Examples:
<screen>
# perl
-weechat::register("test", "1.0", "end_test", "Test script!");
+weechat::register("test", "1.0", "end_test", "Test script!", "ISO-8859-1");
+
+# python
+weechat.register("test", "1.0", "end_test", "Test script!", "ISO-8859-1")
+
+# ruby
+Weechat.register("test", "1.0", "end_test", "Test script!", "ISO-8859-1")
+
+-- lua
+weechat.register("test", "1.0", "end_test", "Test script!", "ISO-8859-1")
+</screen>
+ </para>
+ </section>
+
+ <section id="secScript_set_charset">
+ <title>set_charset</title>
+
+ <para>
+ Perl prototype:
+ <command>
+ weechat::set_charset(charset);
+ </command>
+ </para>
+ <para>
+ Python prototype:
+ <command>
+ weechat.set_charset(charset)
+ </command>
+ </para>
+ <para>
+ Ruby prototype:
+ <command>
+ Weechat.set_charset(charset)
+ </command>
+ </para>
+ <para>
+ Lua prototype:
+ <command>
+ weechat.set_charset(charset)
+ </command>
+ </para>
+ <para>
+ Set new script charset.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>charset</option>: new script charset
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: 1 if new charset was set, 0 if an error occured.
+ </para>
+ <para>
+ Examples:
+<screen>
+# perl
+weechat::set_charset("ISO-8859-1");
# python
-weechat.register("test", "1.0", "end_test", "Test script!")
+weechat.set_charset("ISO-8859-1")
# ruby
-Weechat.register("test", "1.0", "end_test", "Test script!")
+Weechat.set_charset("ISO-8859-1")
-- lua
-weechat.register("test", "1.0", "end_test", "Test script!")
+weechat.set_charset("ISO-8859-1")
</screen>
</para>
</section>
@@ -5367,7 +5569,7 @@ end
-- lua
weechat.add_timer_handler(60, "my_timer")
function my_timer()
- weechat.print("this is timer handler)
+ weechat.print("this is timer handler")
return weechat.PLUGIN_RC_OK()
end
</screen>
@@ -5776,27 +5978,43 @@ weechat.remove_keyboard_handler("my_keyboard")
Examples:
<screen>
# perl
-weechat::add_modifier("irc_in", "privmsg", "my_function");
-sub my_function
+weechat::add_modifier("irc_in", "privmsg", "mod_in");
+weechat::add_modifier("irc_out", "privmsg", "mod_out");
+sub mod_in
+{
+ return "$_[1] [modifier IN]";
+}
+sub mod_out
{
- # TODO
+ return "$_[1] [modifier OUT]";
}
# python
-weechat.add_modifier("irc_in", "privmsg", "my_function")
-def my_function(serveur, args):
- # TODO
+weechat.add_modifier("irc_in", "privmsg", "mod_in")
+weechat.add_modifier("irc_out", "privmsg", "mod_out")
+def mod_in(serveur, args):
+ return args + " [modifier IN]"
+def mod_out(serveur, args):
+ return args + " [modifier OUT]"
# ruby
-Weechat.add_modifier("irc_in", "privmsg", "my_function")
-def my_function(server, args)
- # TODO
+Weechat.add_modifier("irc_in", "privmsg", "mod_in")
+Weechat.add_modifier("irc_out", "privmsg", "mod_out")
+def mod_in(server, args)
+ return args + " [modifier IN]"
+end
+def mod_out(server, args)
+ return args + " [modifier OUT]"
end
-- lua
-weechat.add_modifier("irc_in", "privmsg", "my_function")
-function my_function(server, args)
- -- TODO
+weechat.add_modifier("irc_in", "privmsg", "mod_in")
+weechat.add_modifier("irc_out", "privmsg", "mod_out")
+function mod_in(server, args)
+ return args .. " [modifier IN]"
+end
+function mod_out(server, args)
+ return args .. " [modifier OUT]"
end
</screen>
</para>
@@ -5859,16 +6077,16 @@ end
Examples:
<screen>
# perl
-weechat::remove_modifier("irc_in", "privmsg", "my_function");
+weechat::remove_modifier("irc_in", "privmsg", "mod_in");
# python
-weechat.remove_modifier("irc_in", "privmsg", "my_function")
+weechat.remove_modifier("irc_in", "privmsg", "mod_in")
# ruby
-Weechat.remove_modifier("irc_in", "privmsg", "my_function")
+Weechat.remove_modifier("irc_in", "privmsg", "mod_in")
-- lua
-weechat.remove_modifier("irc_in", "privmsg", "my_function")
+weechat.remove_modifier("irc_in", "privmsg", "mod_in")
</screen>
</para>
</section>
@@ -7162,8 +7380,8 @@ end
</listitem>
<listitem>
<para>
- <emphasis>Kolter</emphasis>
- <email>kolter AT free.fr</email> -
+ <emphasis>kolter (Emmanuel Bouthenot)</emphasis>
+ <email>kolter AT openics.org</email> -
developer
</para>
</listitem>