summaryrefslogtreecommitdiff
path: root/doc/en/plugin_fifo.en.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/en/plugin_fifo.en.xml')
-rw-r--r--doc/en/plugin_fifo.en.xml96
1 files changed, 96 insertions, 0 deletions
diff --git a/doc/en/plugin_fifo.en.xml b/doc/en/plugin_fifo.en.xml
new file mode 100644
index 000000000..c1c2e081e
--- /dev/null
+++ b/doc/en/plugin_fifo.en.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<!--
+
+WeeChat documentation (english version)
+
+Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
+
+This manual is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This manual is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+
+<section id="secPluginFifo">
+ <title>FIFO plugin</title>
+
+ <para>
+ You can remote control WeeChat, by sending commands or text to a
+ FIFO pipe (if option "plugins.var.fifo.fifo" is enabled, it is by default).
+ </para>
+
+ <para>
+ The FIFO pipe is located in "<literal>~/.weechat/</literal>" and is
+ called "weechat_fifo_xxxxx" (where xxxxx is the process ID (PID) of
+ running WeeChat).
+ </para>
+
+ <para>
+ Syntax for the FIFO pipe commands/text is one of following:
+ <screen>
+ category,name *text or command here
+ name *text or command here
+ *text or command here
+ </screen>
+ </para>
+
+ <para>
+ Some examples:
+ <itemizedlist>
+ <listitem>
+ <para>
+ nick change on freenode to "mynick|out" :
+ <screen><prompt>$ </prompt><userinput>echo 'freenode,freenode */nick mynick|out' &gt;~/.weechat/weechat_fifo_12345</userinput></screen>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ display text on #weechat channel:
+ <screen><prompt>$ </prompt><userinput>echo 'freenode,#weechat *hello everybody!' >~/.weechat/weechat_fifo_12345</userinput></screen>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ display text on current channel (buffer displayed by WeeChat):
+ <screen><prompt>$ </prompt><userinput>echo '*hello!' >~/.weechat/weechat_fifo_12345</userinput></screen>
+ <emphasis>Warning:</emphasis> this is dangerous and you should
+ not do that except if you know what you do!
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ send two commands to unload/reload Perl scripts (you have to
+ separate them with "\n"):
+ <screen><prompt>$ </prompt><userinput>echo -e " weechat,weechat */perl unload\nweechat,weechat */perl autoload" >~/.weechat/weechat_fifo_12345</userinput></screen>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ You can write a script to send command to all running WeeChat at same
+ time, for example:
+<screen>
+#!/bin/sh
+if [ $# -eq 1 ]; then
+ for fifo in ~/.weechat/weechat_fifo_*
+ do
+ echo -e "$1" >$fifo
+ done
+fi
+</screen>
+ If the script is called "auto_weechat_command", you can run it with:
+<screen><prompt>$ </prompt><userinput>./auto_weechat_command "freenode,#weechat *hello"</userinput></screen>
+ </para>
+
+</section>