diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-05-26 14:27:35 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-05-26 14:27:35 +0200 |
commit | 4fa856c77316eadd36c65a197f68422d4a8dae68 (patch) | |
tree | a60016a0b1208bbb8da24819a960fb41b54fb5fb /doc/en/plugin_fifo.en.xml | |
parent | fb1b3e7cff5cbcee7adcb0f6de75c66199c5ccc8 (diff) | |
download | weechat-4fa856c77316eadd36c65a197f68422d4a8dae68.zip |
Update doc
Diffstat (limited to 'doc/en/plugin_fifo.en.xml')
-rw-r--r-- | doc/en/plugin_fifo.en.xml | 96 |
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' >~/.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> |