mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 20:36:38 +02:00
101 lines
3.3 KiB
XML
101 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
|
|
WeeChat documentation (french 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="secFIFOpipe">
|
|
<title>Tube FIFO</title>
|
|
|
|
<para>
|
|
Vous pouvez contrôler WeeChat à distance, en envoyant des commandes
|
|
ou du texte dans un tube FIFO (si l'option "plugins.var.fifo.fifo" est
|
|
activée, elle l'est par défaut).
|
|
</para>
|
|
|
|
<para>
|
|
Le tube FIFO est dans le répertoire "<literal>~/.weechat/</literal>"
|
|
et s'appelle "weechat_fifo_xxxxx" (où xxxxx est l'ID du processus
|
|
(PID) du WeeChat qui tourne).
|
|
</para>
|
|
|
|
<para>
|
|
La syntaxe pour envoyer des commandes ou du texte dans le tube FIFO
|
|
est une des suivantes :
|
|
<screen>
|
|
catégorie,nom *texte ou commande ici
|
|
nom *texte ou commande ici
|
|
*texte ou commande ici
|
|
</screen>
|
|
</para>
|
|
|
|
<para>
|
|
Quelques exemples :
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
changement du pseudo sur freenode en "pseudo|absent" :
|
|
<screen><prompt>$ </prompt><userinput>echo 'freenode,freenode */nick pseudo|absent' >~/.weechat/weechat_fifo_12345</userinput></screen>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
affichage de texte sur le canal #weechat :
|
|
<screen><prompt>$ </prompt><userinput>echo 'freenode,#weechat *bonjour tout le monde !' >~/.weechat/weechat_fifo_12345</userinput></screen>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
affichage de texte sur le canal courant (le tampon affiché
|
|
par WeeChat) :
|
|
<screen><prompt>$ </prompt><userinput>echo '*bonjour !' >~/.weechat/weechat_fifo_12345</userinput></screen>
|
|
<emphasis>Attention :</emphasis> ceci est dangereux et vous ne
|
|
devriez pas le faire sauf si vous savez ce que vous faites !
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
envoyer deux commandes pour décharger/recharger les scripts Perl
|
|
(vous devez les séparer par "\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>
|
|
Vous pouvez écrire un script qui envoie les commandes à tous les
|
|
WeeChat qui tournent en même temps, par exemple :
|
|
<screen>
|
|
#!/bin/sh
|
|
if [ $# -eq 1 ]; then
|
|
for fifo in ~/.weechat/weechat_fifo_*
|
|
do
|
|
echo -e "$1" >$fifo
|
|
done
|
|
fi
|
|
</screen>
|
|
Si le script s'appelle "auto_weechat_command", vous pouvez le lancer
|
|
ainsi :
|
|
<screen><prompt>$ </prompt><userinput>./auto_weechat_command "freenode,#weechat *bonjour"</userinput></screen>
|
|
</para>
|
|
|
|
</section>
|