FIFO plugin
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).
The FIFO pipe is located in "~/.weechat/" and is
called "weechat_fifo_xxxxx" (where xxxxx is the process ID (PID) of
running WeeChat).
Syntax for the FIFO pipe commands/text is one of following:
category,name *text or command here
name *text or command here
*text or command here
Some examples:
nick change on freenode to "mynick|out" :
$ echo 'freenode,freenode */nick mynick|out' >~/.weechat/weechat_fifo_12345
display text on #weechat channel:
$ echo 'freenode,#weechat *hello everybody!' >~/.weechat/weechat_fifo_12345
display text on current channel (buffer displayed by WeeChat):
$ echo '*hello!' >~/.weechat/weechat_fifo_12345
Warning: this is dangerous and you should
not do that except if you know what you do!
send two commands to unload/reload Perl scripts (you have to
separate them with "\n"):
$ echo -e " weechat,weechat */perl unload\nweechat,weechat */perl autoload" >~/.weechat/weechat_fifo_12345
You can write a script to send command to all running WeeChat at same
time, for example:
#!/bin/sh
if [ $# -eq 1 ]; then
for fifo in ~/.weechat/weechat_fifo_*
do
echo -e "$1" >$fifo
done
fi
If the script is called "auto_weechat_command", you can run it with:
$ ./auto_weechat_command "freenode,#weechat *hello"