summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--ReleaseNotes.adoc12
-rw-r--r--doc/de/autogen/user/fifo_commands.adoc24
-rw-r--r--doc/de/autogen/user/fifo_options.adoc13
-rw-r--r--doc/de/weechat_user.de.adoc49
-rw-r--r--doc/en/autogen/user/fifo_commands.adoc4
-rw-r--r--doc/en/autogen/user/fifo_options.adoc13
-rw-r--r--doc/en/weechat_dev.en.adoc1
-rw-r--r--doc/en/weechat_user.en.adoc48
-rw-r--r--doc/fr/autogen/user/fifo_commands.adoc4
-rw-r--r--doc/fr/autogen/user/fifo_options.adoc13
-rw-r--r--doc/fr/weechat_dev.fr.adoc1
-rw-r--r--doc/fr/weechat_user.fr.adoc48
-rw-r--r--doc/it/autogen/user/fifo_commands.adoc4
-rw-r--r--doc/it/autogen/user/fifo_options.adoc13
-rw-r--r--doc/it/weechat_user.it.adoc56
-rw-r--r--doc/ja/autogen/user/fifo_commands.adoc24
-rw-r--r--doc/ja/autogen/user/fifo_options.adoc13
-rw-r--r--doc/ja/weechat_dev.ja.adoc1
-rw-r--r--doc/ja/weechat_user.ja.adoc51
-rw-r--r--doc/pl/autogen/user/fifo_commands.adoc24
-rw-r--r--doc/pl/autogen/user/fifo_options.adoc13
-rw-r--r--doc/pl/weechat_user.pl.adoc53
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/cs.po34
-rw-r--r--po/de.po33
-rw-r--r--po/es.po34
-rw-r--r--po/fr.po39
-rw-r--r--po/hu.po31
-rw-r--r--po/it.po34
-rw-r--r--po/ja.po33
-rw-r--r--po/pl.po33
-rw-r--r--po/pt.po33
-rw-r--r--po/pt_BR.po30
-rw-r--r--po/ru.po31
-rw-r--r--po/srcfiles.cmake2
-rw-r--r--po/tr.po26
-rw-r--r--po/weechat.pot22
-rw-r--r--src/plugins/fifo/CMakeLists.txt1
-rw-r--r--src/plugins/fifo/Makefile.am2
-rw-r--r--src/plugins/fifo/fifo-command.c16
-rw-r--r--src/plugins/fifo/fifo-config.c160
-rw-r--r--src/plugins/fifo/fifo-config.h34
-rw-r--r--src/plugins/fifo/fifo.c220
-rw-r--r--src/plugins/fifo/fifo.h4
45 files changed, 841 insertions, 496 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index fcc45803d..a33bba4d3 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -21,6 +21,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
New features::
* api: add info "pid" (WeeChat PID) (issue #850)
+ * fifo: add file fifo.conf and option fifo.file.path to customize FIFO pipe path/filename (issue #850)
Improvements::
diff --git a/ReleaseNotes.adoc b/ReleaseNotes.adoc
index c1f14e0d0..657cbce19 100644
--- a/ReleaseNotes.adoc
+++ b/ReleaseNotes.adoc
@@ -20,6 +20,18 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
[[v1.7]]
== Version 1.7 (under dev)
+[[v1.7_fifo_options]]
+=== FIFO options
+
+A new configuration file "fifo.conf" has been added and the old option
+_plugins.var.fifo.fifo_ has been moved to _fifo.file.enabled_.
+
+A new option _fifo.file.path_ can be used to customize the FIFO pipe
+path/filename.
+
+[[v1.7_default_triggers]]
+=== Default triggers
+
A new trigger "cmd_pass_register" has been added to hide only password and not
email in command `/msg nickserv register password email`. +
The existing trigger "cmd_pass" has been updated to hide password in all
diff --git a/doc/de/autogen/user/fifo_commands.adoc b/doc/de/autogen/user/fifo_commands.adoc
index 819f8219f..627bb1139 100644
--- a/doc/de/autogen/user/fifo_commands.adoc
+++ b/doc/de/autogen/user/fifo_commands.adoc
@@ -8,22 +8,22 @@
----
/fifo enable|disable|toggle
- enable: aktivieren der FIFO pipe
-disable: deaktivieren der FIFO pipe
- toggle: Status der FIFO pipe umschalten
+ enable: enable FIFO pipe
+disable: disable FIFO pipe
+ toggle: toggle FIFO pipe
-Die FIFO-Pipe wird als Fernbedienung genutzt, es können Befehle oder Text von der Shell an die FIFO-Pipe geschickt werden
-Standardmäßig ist die FIFO-Pipe in ~/.weechat/weechat_fifo_xxx ("xxx" ist die PID von WeeChat).
+FIFO pipe is used as remote control of WeeChat: you can send commands or text to the FIFO pipe from your shell.
+By default the FIFO pipe is in ~/.weechat/weechat_fifo
-Folgendes Format wird erwartet:
- plugin.buffer *Text oder Befehl an dieser Stelle
- *Text oder Befehl an dieser Stelle
+The expected format is one of:
+ plugin.buffer *text or command here
+ *text or command here
-Beispiel um den Nick auf dem Server freenode zu ändern:
- echo 'irc.server.freenode */nick neuer_Nick' >~/.weechat/weechat_fifo_12345
+For example to change your freenode nick:
+ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
-Bitte lese die Benutzeranleitung für weitere Informationen und Beispiele.
+Please read the user's guide for more info and examples.
-Beispiele:
+Examples:
/fifo toggle
----
diff --git a/doc/de/autogen/user/fifo_options.adoc b/doc/de/autogen/user/fifo_options.adoc
new file mode 100644
index 000000000..3b3089cf3
--- /dev/null
+++ b/doc/de/autogen/user/fifo_options.adoc
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** Beschreibung: pass:none[enable FIFO pipe]
+** Typ: boolesch
+** Werte: on, off (Standardwert: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** Beschreibung: pass:none[path for FIFO file; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default); WeeChat PID can be used in path with ${info:pid} (note: content is evaluated, see /help eval)]
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `+"%h/weechat_fifo"+`)
diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc
index 315aae73e..12ebeebb2 100644
--- a/doc/de/weechat_user.de.adoc
+++ b/doc/de/weechat_user.de.adoc
@@ -2121,11 +2121,11 @@ include::autogen/user/exec_commands.adoc[]
=== Fifo Erweiterung
Sie können WeeChat fern steuern indem Sie Befehle oder einen Text an die FIFO Pipe
-schicken (dazu muss die Option "plugins.var.fifo.fifo" aktiviert sein (standardmäßig
+schicken (dazu muss die Option "fifo.file.enabled" aktiviert sein (standardmäßig
ist diese Option aktiviert).
-Die FIFO pipe findet man in _~/.weechat/_ und heisst _weechat_fifo_xxxx_
-(_xxxx_ ist dabei die ID (PID) der laufenden WeeChat Session).
+// TRANSLATION MISSING
+The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default.
Die Syntax der FIFO Pipe Befehle/Text sieht wie folgt aus:
@@ -2136,49 +2136,46 @@ Die Syntax der FIFO Pipe Befehle/Text sieht wie folgt aus:
einige Beispiele:
-* Den eigenen Nick auf dem IRC Server freenode in "newnick" ändern:
+* Change nick on IRC server freenode to "newnick":
----
-$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
----
-* Den Text _Hallo!_ in den Channel #weechat schreiben:
+* Send a message on IRC #weechat channel:
----
-$ echo 'irc.freenode.#weechat *Hallo!' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo
----
-* Einen Text im aktuellen Buffer ausgeben:
+* Send a message on current buffer:
----
-$ echo '*hello!' >~/.weechat/weechat_fifo_12345
+$ echo '*hello!' >~/.weechat/weechat_fifo
----
-* sendet zwei Befehle um alle Python-Skripten zu entfernen und dann neu zu laden (die beiden Befehle müssen
+* Sendet zwei Befehle um alle Python-Skripten zu entfernen und dann neu zu laden (die beiden Befehle müssen
mit "\n" getrennt werden):
----
-$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo_12345
+$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo
----
-Das nachfolgende Skript sendet einen Befehl an alle laufenden WeeChat Instanzen:
+[[fifo_options]]
+==== Optionen (fifo.conf)
-[source,shell]
-----
-#!/bin/sh
-if [ $# -eq 1 ]; then
- for fifo in ~/.weechat/weechat_fifo_*
- do
- echo -e "$1" >$fifo
- done
-fi
-----
+Sektionen:
+
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| Sektion | Steuerbefehl | Beschreibung
+// TRANSLATION MISSING
+| file | /set fifo.file.* | FIFO pipe control
+|===
-Falls man das Skript "auto_weechat_command" benennt ruft man es wie folgt auf:
+Optionen:
-----
-$ ./auto_weechat_command 'irc.freenode.#weechat *Hallo'
-----
+include::autogen/user/fifo_options.adoc[]
[[fifo_commands]]
==== Befehle
diff --git a/doc/en/autogen/user/fifo_commands.adoc b/doc/en/autogen/user/fifo_commands.adoc
index f0835cdba..eee8b2526 100644
--- a/doc/en/autogen/user/fifo_commands.adoc
+++ b/doc/en/autogen/user/fifo_commands.adoc
@@ -13,14 +13,14 @@ disable: disable FIFO pipe
toggle: toggle FIFO pipe
FIFO pipe is used as remote control of WeeChat: you can send commands or text to the FIFO pipe from your shell.
-By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx ("xxx" is the WeeChat PID).
+By default the FIFO pipe is in ~/.weechat/weechat_fifo
The expected format is one of:
plugin.buffer *text or command here
*text or command here
For example to change your freenode nick:
- echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
Please read the user's guide for more info and examples.
diff --git a/doc/en/autogen/user/fifo_options.adoc b/doc/en/autogen/user/fifo_options.adoc
new file mode 100644
index 000000000..6bb87ef17
--- /dev/null
+++ b/doc/en/autogen/user/fifo_options.adoc
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** description: pass:none[enable FIFO pipe]
+** type: boolean
+** values: on, off (default value: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** description: pass:none[path for FIFO file; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default); WeeChat PID can be used in path with ${info:pid} (note: content is evaluated, see /help eval)]
+** type: string
+** values: any string (default value: `+"%h/weechat_fifo"+`)
diff --git a/doc/en/weechat_dev.en.adoc b/doc/en/weechat_dev.en.adoc
index c6c119657..df9f179e1 100644
--- a/doc/en/weechat_dev.en.adoc
+++ b/doc/en/weechat_dev.en.adoc
@@ -204,6 +204,7 @@ WeeChat "core" is located in following directories:
|    fifo/ | Fifo plugin
|       fifo.c | Main fifo functions
|       fifo-command.c | Fifo commands
+|       fifo-config.c | Fifo config options (file fifo.conf)
|       fifo-info.c | Fifo info/infolists/hdata
|    guile/ | Guile (scheme) plugin
|       weechat-guile.c | Main guile functions (load/unload scripts, execute guile code)
diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc
index e1acd401e..2b44a647d 100644
--- a/doc/en/weechat_user.en.adoc
+++ b/doc/en/weechat_user.en.adoc
@@ -2072,10 +2072,9 @@ include::autogen/user/exec_commands.adoc[]
=== 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).
+option "fifo.file.enabled" is enabled, it is by default).
-The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_xxxx_
-(where _xxxx_ is the process ID (PID) of running WeeChat).
+The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default.
Syntax for the FIFO pipe commands/text is one of following:
@@ -2086,50 +2085,45 @@ Syntax for the FIFO pipe commands/text is one of following:
Some examples:
-* nick change on IRC server freenode to "newnick":
+* Change nick on IRC server freenode to "newnick":
----
-$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
----
-* display text on IRC #weechat channel:
+* Send a message on IRC #weechat channel:
----
-$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo
----
-* display text on current buffer:
+* Send a message on current buffer:
----
-$ echo '*hello!' >~/.weechat/weechat_fifo_12345
+$ echo '*hello!' >~/.weechat/weechat_fifo
----
-* send two commands to unload/reload Python scripts (you have to separate them
+* Send two commands to unload/reload Python scripts (you have to separate them
with "\n"):
----
-$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo_12345
+$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo
----
-You can write a script to send command to all running WeeChat at same time,
-for example:
+[[fifo_options]]
+==== Options (fifo.conf)
-[source,shell]
-----
-#!/bin/sh
-if [ $# -eq 1 ]; then
- for fifo in ~/.weechat/weechat_fifo_*
- do
- printf '%b\n' "$1" >"$fifo"
- done
-fi
-----
+Sections:
+
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| Section | Control command | Description
+| file | /set fifo.file.* | FIFO pipe control
+|===
-If the script is called "auto_weechat_command", you can run it with:
+Options:
-----
-$ ./auto_weechat_command 'irc.freenode.#weechat *hello'
-----
+include::autogen/user/fifo_options.adoc[]
[[fifo_commands]]
==== Commands
diff --git a/doc/fr/autogen/user/fifo_commands.adoc b/doc/fr/autogen/user/fifo_commands.adoc
index 0374d25b3..5b588c7f9 100644
--- a/doc/fr/autogen/user/fifo_commands.adoc
+++ b/doc/fr/autogen/user/fifo_commands.adoc
@@ -13,14 +13,14 @@ disable : désactiver le tube FIFO
toggle : activer/désactiver le tube FIFO
Le tube FIFO est utilisé comme contrôle à distance de WeeChat : vous pouvez envoyer des commandes ou du texte au tube FIFO depuis votre shell.
-Par défaut le tube FIFO est dans ~/.weechat/weechat_fifo_xxx ("xxx" est le PID de WeeChat).
+Par défaut le tube FIFO est dans ~/.weechat/weechat_fifo
Le format attendu est l'un des suivants :
plugin.buffer *texte ou commande ici
*texte ou commande ici
Par exemple pour changer votre pseudo sur freenode :
- echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo_12345
+ echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo
Merci de lire le guide utilisateur pour plus d'information et des exemples.
diff --git a/doc/fr/autogen/user/fifo_options.adoc b/doc/fr/autogen/user/fifo_options.adoc
new file mode 100644
index 000000000..34299d093
--- /dev/null
+++ b/doc/fr/autogen/user/fifo_options.adoc
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** description: pass:none[activer le tube FIFO]
+** type: booléen
+** valeurs: on, off (valeur par défaut: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** description: pass:none[chemin pour le tube FIFO ; "%h" au début de la chaîne est remplacé par le répertoire de base WeeChat (par défaut : "~/.weechat") ; le PID de WeeChat peut être utilisé dans le chemin avec ${info:pid} (note : le contenu est évalué, voir /help eval)]
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `+"%h/weechat_fifo"+`)
diff --git a/doc/fr/weechat_dev.fr.adoc b/doc/fr/weechat_dev.fr.adoc
index 597e9469e..145bf0bee 100644
--- a/doc/fr/weechat_dev.fr.adoc
+++ b/doc/fr/weechat_dev.fr.adoc
@@ -206,6 +206,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|    fifo/ | Extension Fifo
|       fifo.c | Fonctions principales de Fifo
|       fifo-command.c | Commandes pour Fifo
+|       fifo-config.c | Options de configuration pour Fifo (fichier fifo.conf)
|       fifo-info.c | Info/infolists/hdata pour Fifo
|    guile/ | Extension Guile (scheme)
|       weechat-guile.c | Fonctions principales pour Guile (chargement/déchargement des scripts, exécution de code Guile)
diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc
index 36f033e15..8e07f7ac4 100644
--- a/doc/fr/weechat_user.fr.adoc
+++ b/doc/fr/weechat_user.fr.adoc
@@ -2138,12 +2138,11 @@ include::autogen/user/exec_commands.adoc[]
=== Extension Fifo
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,
+texte dans un tube FIFO (si l'option _fifo.file.enabled_ est activée,
elle l'est par défaut).
-Le tube FIFO est dans le répertoire _~/.weechat/_ et s'appelle
-_weechat_fifo_xxxx_ (où _xxxx_ est l'ID du processus (PID) du WeeChat qui
-tourne).
+Le tube FIFO est dans le répertoire _~/.weechat/_ et s'appelle _weechat_fifo_
+par défaut.
La syntaxe pour envoyer des commandes ou du texte dans le tube FIFO est une
des suivantes :
@@ -2155,50 +2154,45 @@ des suivantes :
Quelques exemples :
-* Changement du pseudo sur freenode en "autrepseudo" :
+* Changer le pseudo sur freenode en "autrepseudo" :
----
-$ echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo
----
-* Affichage de texte sur le canal IRC #weechat :
+* Envoyer un message sur le canal IRC #weechat :
----
-$ echo 'irc.freenode.#weechat *bonjour !' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.freenode.#weechat *bonjour !' >~/.weechat/weechat_fifo
----
-* Affichage de texte sur le tampon courant :
+* Envoyer un message sur le tampon courant :
----
-$ echo '*bonjour !' >~/.weechat/weechat_fifo_12345
+$ echo '*bonjour !' >~/.weechat/weechat_fifo
----
* Envoyer deux commandes pour décharger/recharger les scripts Python (vous devez
les séparer par "\n") :
----
-$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo_12345
+$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo
----
-Vous pouvez écrire un script qui envoie les commandes à tous les WeeChat qui
-tournent en même temps, par exemple :
+[[fifo_options]]
+==== Options (fifo.conf)
-[source,shell]
-----
-#!/bin/sh
-if [ $# -eq 1 ]; then
- for fifo in ~/.weechat/weechat_fifo_*
- do
- printf '%b\n' "$1" >"$fifo"
- done
-fi
-----
+Sections :
-Si le script s'appelle "auto_weechat_command", vous pouvez le lancer ainsi :
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| Section | Commande de contrôle | Description
+| file | /set fifo.file.* | Contrôle du tube FIFO
+|===
-----
-$ ./auto_weechat_command 'irc.freenode.#weechat *bonjour'
-----
+Options :
+
+include::autogen/user/fifo_options.adoc[]
[[fifo_commands]]
==== Commandes
diff --git a/doc/it/autogen/user/fifo_commands.adoc b/doc/it/autogen/user/fifo_commands.adoc
index f0835cdba..eee8b2526 100644
--- a/doc/it/autogen/user/fifo_commands.adoc
+++ b/doc/it/autogen/user/fifo_commands.adoc
@@ -13,14 +13,14 @@ disable: disable FIFO pipe
toggle: toggle FIFO pipe
FIFO pipe is used as remote control of WeeChat: you can send commands or text to the FIFO pipe from your shell.
-By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx ("xxx" is the WeeChat PID).
+By default the FIFO pipe is in ~/.weechat/weechat_fifo
The expected format is one of:
plugin.buffer *text or command here
*text or command here
For example to change your freenode nick:
- echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
Please read the user's guide for more info and examples.
diff --git a/doc/it/autogen/user/fifo_options.adoc b/doc/it/autogen/user/fifo_options.adoc
new file mode 100644
index 000000000..9d0055bca
--- /dev/null
+++ b/doc/it/autogen/user/fifo_options.adoc
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** descrizione: pass:none[enable FIFO pipe]
+** tipo: bool
+** valori: on, off (valore predefinito: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** descrizione: pass:none[path for FIFO file; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default); WeeChat PID can be used in path with ${info:pid} (note: content is evaluated, see /help eval)]
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `+"%h/weechat_fifo"+`)
diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc
index 3565f4702..8e76afaa5 100644
--- a/doc/it/weechat_user.it.adoc
+++ b/doc/it/weechat_user.it.adoc
@@ -2187,10 +2187,10 @@ include::autogen/user/exec_commands.adoc[]
=== Plugin Fifo
È possibile controllare da remoto WeeChat, inviando comandi o del testo ad una
-pipe FIFO (se l'opzione "plugins.var.fifo.fifo" è abilitata, e lo è per default).
+pipe FIFO (se l'opzione "fifo.file.enabled" è abilitata, e lo è per default).
-La pipe FIFO si trova in _~/.weechat/_ ed è chiamata _weechat_fifo_xxxx_
-(dove _xxxx_ è l'ID del processo (PID) dell'istanza di WeeChat in esecuzione).
+// TRANSLATION MISSING
+The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default.
La sintassi per i comandi/testo della pipe FIFO è una delle seguenti:
@@ -2201,51 +2201,51 @@ La sintassi per i comandi/testo della pipe FIFO è una delle seguenti:
Alcuni esempi:
-* cambiare il nick sul server IRC freenode in "nuovonick":
+// TRANSLATION MISSING
+* Change nick on IRC server freenode to "newnick":
----
-$ echo 'irc.server.freenode */nick nuovonick' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
----
-* visualizazre del testo sul canale IRC #weechat:
+// TRANSLATION MISSING
+* Send a message on IRC #weechat channel:
----
-$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo
----
-* visualizzare del testo sul buffer attivo:
+// TRANSLATION MISSING
+* Send a message on current buffer:
----
-$ echo '*hello!' >~/.weechat/weechat_fifo_12345
+$ echo '*hello!' >~/.weechat/weechat_fifo
----
-* inviare due comandi per scaricare/caricare gli script Python (è necessario
+* Inviare due comandi per scaricare/caricare gli script Python (è necessario
separarli con "\n"):
----
-$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo_12345
+$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo
----
-È possibile realizzare uno script per inviare un comando a tutte le istanze di
-WeeChat in esecuzione, per esempio:
+[[fifo_options]]
+==== Opzioni (fifo.conf)
-[source,shell]
-----
-#!/bin/sh
-if [ $# -eq 1 ]; then
- for fifo in ~/.weechat/weechat_fifo_*
- do
- printf '%b\n' "$1" >"$fifo"
- done
-fi
-----
+// TRANSLATION MISSING
+Sections:
-Se lo script viene chiamato "auto_weechat_command", può essere
-eseguito con:
+// TRANSLATION MISSING
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| Section | Control command | Description
+| file | /set fifo.file.* | FIFO pipe control
+|===
-----
-$ ./auto_weechat_command 'irc.freenode.#weechat *ciao'
-----
+// TRANSLATION MISSING
+Options:
+
+include::autogen/user/fifo_options.adoc[]
[[fifo_commands]]
==== Comandi
diff --git a/doc/ja/autogen/user/fifo_commands.adoc b/doc/ja/autogen/user/fifo_commands.adoc
index 147c5f864..452f29c50 100644
--- a/doc/ja/autogen/user/fifo_commands.adoc
+++ b/doc/ja/autogen/user/fifo_commands.adoc
@@ -8,22 +8,22 @@
----
/fifo enable|disable|toggle
- enable: FIFO パイプを有効化します
-disable: FIFO パイプを無効化します
- toggle: FIFO パイプの有効無効を切り替えます
+ enable: enable FIFO pipe
+disable: disable FIFO pipe
+ toggle: toggle FIFO pipe
-FIFO パイプは WeeChat をリモート操作する際に使われます: FIFO パイプを通じてシェルからコマンドやテキストを送信できます。
-デフォルトの場合 FIFO パイプは ~/.weechat/weechat_fifo_xxx です ("xxx" は WeeChat の PID です)。
+FIFO pipe is used as remote control of WeeChat: you can send commands or text to the FIFO pipe from your shell.
+By default the FIFO pipe is in ~/.weechat/weechat_fifo
-書式は次のうちのどれか 1 つを使ってください:
- plugin.buffer *テキストまたはコマンド
- *テキストまたはコマンド
+The expected format is one of:
+ plugin.buffer *text or command here
+ *text or command here
-freenode のニックネームを変更する例:
- echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+For example to change your freenode nick:
+ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
-詳しい情報と例はユーザーズガイドを参照してください。
+Please read the user's guide for more info and examples.
-例:
+Examples:
/fifo toggle
----
diff --git a/doc/ja/autogen/user/fifo_options.adoc b/doc/ja/autogen/user/fifo_options.adoc
new file mode 100644
index 000000000..16c7d0a28
--- /dev/null
+++ b/doc/ja/autogen/user/fifo_options.adoc
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** 説明: pass:none[enable FIFO pipe]
+** タイプ: ブール
+** 値: on, off (デフォルト値: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** 説明: pass:none[path for FIFO file; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default); WeeChat PID can be used in path with ${info:pid} (note: content is evaluated, see /help eval)]
+** タイプ: 文字列
+** 値: 未制約文字列 (デフォルト値: `+"%h/weechat_fifo"+`)
diff --git a/doc/ja/weechat_dev.ja.adoc b/doc/ja/weechat_dev.ja.adoc
index 97579c277..6156b548c 100644
--- a/doc/ja/weechat_dev.ja.adoc
+++ b/doc/ja/weechat_dev.ja.adoc
@@ -210,6 +210,7 @@ WeeChat "core" は以下のディレクトリに配置されています:
|    fifo/ | fifo プラグイン
|       fifo.c | fifo の主要関数
|       fifo-command.c | fifo コマンド
+|       fifo-config.c | fifo 設定オプション (fifo.conf ファイル)
|       fifo-info.c | fifo の情報/インフォリスト/hdata
|    guile/ | guile (scheme) プラグイン
|       weechat-guile.c | guile の主要関数 (スクリプトのロード/アンロード、guile コードの実行)
diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc
index daa83b86a..094952153 100644
--- a/doc/ja/weechat_user.ja.adoc
+++ b/doc/ja/weechat_user.ja.adoc
@@ -2071,11 +2071,11 @@ include::autogen/user/exec_commands.adoc[]
[[fifo_plugin]]
=== Fifo プラグイン
-外部から WeeChat を操作するには、FIFO パイプにコマンドやテキストを書き込んでください ("plugins.var.fifo.fifo"
+外部から WeeChat を操作するには、FIFO パイプにコマンドやテキストを書き込んでください ("fifo.file.enabled"
オプションが有効化されている必要がありますが、デフォルトで有効化されているはずです)。
-FIFO パイプは _~/.weechat/_ の下にあり、_weechat_fifo_xxxx_
-のような名前になっています (_xxxx_ は実行中の WeeChat のプロセス ID (PID) です)。
+// TRANSLATION MISSING
+The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default.
FIFO パイプに書き込むコマンド/テキストの文法は以下の例の一つです:
@@ -2086,50 +2086,49 @@ FIFO パイプに書き込むコマンド/テキストの文法は以下の例
例:
-* IRC サーバ freenode のニックネームを "newnick" に変更する:
+// TRANSLATION MISSING
+* Change nick on IRC server freenode to "newnick":
----
-$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
----
-* IRC の #weechat チャンネルに対してテキストを送信:
+// TRANSLATION MISSING
+* Send a message on IRC #weechat channel:
----
-$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo
----
-* 現在のバッファに対してテキストを送信:
+// TRANSLATION MISSING
+* Send a message on current buffer:
----
-$ echo '*hello!' >~/.weechat/weechat_fifo_12345
+$ echo '*hello!' >~/.weechat/weechat_fifo
----
* Python スクリプトのアンロードとロードを行う 2 つのコマンドを送信
(複数のコマンドは "\n" で分割してください):
----
-$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo_12345
+$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo
----
-実行中の WeeChat
-すべてに対してコマンドを送信するスクリプトは以下のように書けます。例えば:
+[[fifo_options]]
+==== オプション (fifo.conf)
-[source,shell]
-----
-#!/bin/sh
-if [ $# -eq 1 ]; then
- for fifo in ~/.weechat/weechat_fifo_*
- do
- printf '%b\n' "$1" >"$fifo"
- done
-fi
-----
+セクション:
-このスクリプトを "auto_weechat_command" というファイル名で保存した場合、以下のように実行できます:
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| セクション | 操作コマンド | 説明
+// TRANSLATION MISSING
+| file | /set fifo.file.* | FIFO pipe control
+|===
-----
-$ ./auto_weechat_command 'irc.freenode.#weechat *hello'
-----
+オプション:
+
+include::autogen/user/fifo_options.adoc[]
[[fifo_commands]]
==== コマンド
diff --git a/doc/pl/autogen/user/fifo_commands.adoc b/doc/pl/autogen/user/fifo_commands.adoc
index 7a03d1b51..1989e75ea 100644
--- a/doc/pl/autogen/user/fifo_commands.adoc
+++ b/doc/pl/autogen/user/fifo_commands.adoc
@@ -8,22 +8,22 @@
----
/fifo enable|disable|toggle
- enable: włącza strumień FIFO
-disable: wyłącza strumień FIFO
- toggle: przełącza stan strumienia FIFO
+ enable: enable FIFO pipe
+disable: disable FIFO pipe
+ toggle: toggle FIFO pipe
-Strumień FIFO jest używany do zdalnej kontroli nad WeeChat: możesz wysyłać komendy albo tekst do strumienia z konsoli.
-Domyślnie strumień FIFO jest tworzony w ~/.weechat/weechat_fifo_xxx ("xxx" to PID WeeChat).
+FIFO pipe is used as remote control of WeeChat: you can send commands or text to the FIFO pipe from your shell.
+By default the FIFO pipe is in ~/.weechat/weechat_fifo
-Spodziewane formaty:
- plugin.buffer *tekst albo komenda
- *tekst albo komenda
+The expected format is one of:
+ plugin.buffer *text or command here
+ *text or command here
-Na przykład zmiana nicka w sieci freenode:
- echo 'irc.server.freenode */nick nowynick' >~/.weechat/weechat_fifo_12345
+For example to change your freenode nick:
+ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
-Więcej informacji i przykładów można znaleźć w poradniku użytkownika.
+Please read the user's guide for more info and examples.
-Przykłady:
+Examples:
/fifo toggle
----
diff --git a/doc/pl/autogen/user/fifo_options.adoc b/doc/pl/autogen/user/fifo_options.adoc
new file mode 100644
index 000000000..4616b57ad
--- /dev/null
+++ b/doc/pl/autogen/user/fifo_options.adoc
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** opis: pass:none[enable FIFO pipe]
+** typ: bool
+** wartości: on, off (domyślna wartość: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** opis: pass:none[path for FIFO file; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default); WeeChat PID can be used in path with ${info:pid} (note: content is evaluated, see /help eval)]
+** typ: ciąg
+** wartości: dowolny ciąg (domyślna wartość: `+"%h/weechat_fifo"+`)
diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc
index 76b918d9b..5ee5c0fdc 100644
--- a/doc/pl/weechat_user.pl.adoc
+++ b/doc/pl/weechat_user.pl.adoc
@@ -2092,11 +2092,11 @@ include::autogen/user/exec_commands.adoc[]
=== Wtyczka fifo
Możesz zdalnie kontrolować WeeChat, poprzez wysyłanie komend lub tekstu do
-kolejki FIFO (jeśli opcja "plugins.var.fifo.fifo" jest włączona, domyślnie
-jest włączona).
+kolejki FIFO (jeśli opcja "fifo.file.enabled" jest włączona, domyślnie jest
+włączona).
-Kolejka FIFO jest zlokalizowana w _~/.weechat/_ i nazywa się _weechat_fifo_xxxx_
-(gdzie _xxxx_ to ID procesu (PID) uruchomionego WeeChat).
+// TRANSLATION MISSING
+The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default.
Składnia dla komend/tekstu przekazywanego do kolejki FIFO wygląda następująco:
@@ -2107,50 +2107,49 @@ Składnia dla komend/tekstu przekazywanego do kolejki FIFO wygląda następując
Kilka przykładów:
-* zmiana nicka na serwerze IRC freenode na "nowynick":
+// TRANSLATION MISSING
+* Change nick on IRC server freenode to "newnick":
----
-$ echo 'irc.server.freenode */nick nowynick' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
----
-* wyświetlenie tekstu na kanale IRC #weechat:
+// TRANSLATION MISSING
+* Send a message on IRC #weechat channel:
----
-$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo
----
-* wyświetlenie tekstu w obecnym buforze:
+// TRANSLATION MISSING
+* Send a message on current buffer:
----
-$ echo '*hello!' >~/.weechat/weechat_fifo_12345
+$ echo '*hello!' >~/.weechat/weechat_fifo
----
* wysłanie dwóch komend do wyładowania/przeładowania skryptów Python (należy
oddzielić je za pomocą "\n"):
----
-$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo_12345
+$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo
----
-Można napisać skrypt wysyłający komendy do wszystkich uruchomionych kopi WeeChat
-w tym samym czasie, na przykład:
+[[fifo_options]]
+==== Opcje (fifo.conf)
-[source,shell]
-----
-#!/bin/sh
-if [ $# -eq 1 ]; then
- for fifo in ~/.weechat/weechat_fifo_*
- do
- printf '%b\n' "$1" >"$fifo"
- done
-fi
-----
+Sekcje:
-Nazwa skryptu to "auto_weechat_command", można go wykonać na przykład tak:
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| Sekcja | Komenda | Opis
+// TRANSLATION MISSING
+| file | /set fifo.file.* | FIFO pipe control
+|===
-----
-$ ./auto_weechat_command 'irc.freenode.#weechat *hello'
-----
+Opcje:
+
+include::autogen/user/fifo_options.adoc[]
[[fifo_commands]]
==== Komendy
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6a88ff299..6e616cfe3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -136,6 +136,8 @@
./src/plugins/fifo/fifo.h
./src/plugins/fifo/fifo-command.c
./src/plugins/fifo/fifo-command.h
+./src/plugins/fifo/fifo-config.c
+./src/plugins/fifo/fifo-config.h
./src/plugins/fifo/fifo-info.c
./src/plugins/fifo/fifo-info.h
./src/plugins/guile/weechat-guile-api.c
diff --git a/po/cs.po b/po/cs.po
index d8e36c30d..954334560 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-09-03 08:23+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5084,9 +5084,9 @@ msgstr "barva textu pro akce ve vstupní řádce"
msgid "FIFO pipe for remote control"
msgstr "jméno FIFO roury"
-#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s: odstraňuji starou fifo rouru \"%s\""
+#, fuzzy, c-format
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s: nedostatek paměti"
#, fuzzy, c-format
msgid "%s: pipe opened (file: %s)"
@@ -5143,15 +5143,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -5159,6 +5158,20 @@ msgid ""
" /fifo toggle"
msgstr ""
+#, fuzzy
+msgid "enable FIFO pipe"
+msgstr "jméno FIFO roury"
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"cesta pro logovací soubory WeeChat; \"%h\" na záčátku řetězce je nahrazeno "
+"domácím adresářem WeeChat (\"~/.weechat\" je výchozí); jsou povoleny "
+"specifikátory data (viz. man strftime)"
+
msgid "name of FIFO pipe"
msgstr "jméno FIFO roury"
@@ -8460,10 +8473,6 @@ msgstr ""
"%s%s: měl by jste změnit volbu irc.server.%s.ssl_dhkey_size (aktuální "
"hodnota je %d)"
-#, fuzzy, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s: nedostatek paměti"
-
#, c-format
msgid "%s%s: timeout"
msgstr "%s%s: časový limit"
@@ -11387,3 +11396,6 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)"
+
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s: odstraňuji starou fifo rouru \"%s\""
diff --git a/po/de.po b/po/de.po
index 302664f70..e8744a657 100644
--- a/po/de.po
+++ b/po/de.po
@@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-11-20 20:27+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -6035,8 +6035,8 @@ msgid "FIFO pipe for remote control"
msgstr "FIFO Pipe für Fernsteuerung"
#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s: Entferne alte FIFO Pipe \"%s\""
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s: nicht ausreichend Speicher (%s)"
#, c-format
msgid "%s: pipe opened (file: %s)"
@@ -6085,6 +6085,7 @@ msgstr "Konfiguration für \"fifo\" Erweiterung"
msgid "enable|disable|toggle"
msgstr "enable|disable|toggle"
+#, fuzzy
msgid ""
" enable: enable FIFO pipe\n"
"disable: disable FIFO pipe\n"
@@ -6092,15 +6093,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -6129,6 +6129,20 @@ msgstr ""
"Beispiele:\n"
" /fifo toggle"
+#, fuzzy
+msgid "enable FIFO pipe"
+msgstr "Name der FIFO-Pipe"
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"Pfad für eingehende Dateien: \"%h\" wird durch das WeeChat Verzeichnis "
+"ersetzt (Standardpfad: \"~/.weechat\") (Hinweis: Inhalt wird evaluiert, "
+"siehe /help eval)"
+
msgid "name of FIFO pipe"
msgstr "Name der FIFO-Pipe"
@@ -9770,10 +9784,6 @@ msgstr ""
"ausprobiert werden, z.B. %d oder %d)"
#, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s: nicht ausreichend Speicher (%s)"
-
-#, c-format
msgid "%s%s: timeout"
msgstr "%s%s: Zeitüberschreitung"
@@ -12966,3 +12976,6 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr ""
"%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)"
+
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s: Entferne alte FIFO Pipe \"%s\""
diff --git a/po/es.po b/po/es.po
index 4fef0217b..da83d6754 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-09-03 08:23+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5296,9 +5296,9 @@ msgstr "color para acciones en la línea de entrada"
msgid "FIFO pipe for remote control"
msgstr "Tubería FIFO para control remoto"
-#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s: removiendo vieja tubería fifo \"%s\""
+#, fuzzy, c-format
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s: no hay suficiente memoria"
#, fuzzy, c-format
msgid "%s: pipe opened (file: %s)"
@@ -5355,15 +5355,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -5371,6 +5370,20 @@ msgid ""
" /fifo toggle"
msgstr ""
+#, fuzzy
+msgid "enable FIFO pipe"
+msgstr "nombre de la tubería FIFO"
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"ruta para los registros de WeeChat; \"%h\" al principio de la cadena será "
+"reemplazado por el directorio raíz de WeeChat (\"~/.weechat\" por defecto); "
+"especificadores de fecha son permitidos (ver man strftime)"
+
msgid "name of FIFO pipe"
msgstr "nombre de la tubería FIFO"
@@ -8756,10 +8769,6 @@ msgstr ""
"%s%s: se debería jugar con el valor de la opción irc.server.%s."
"ssl_dhkey_size (el valor actual es %d)"
-#, fuzzy, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s: no hay suficiente memoria"
-
#, c-format
msgid "%s%s: timeout"
msgstr "%s%s: agotado tiempo de espera"
@@ -11647,3 +11656,6 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: no es posible conectarse al transmisor"
+
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s: removiendo vieja tubería fifo \"%s\""
diff --git a/po/fr.po b/po/fr.po
index a834ae67d..a89ea5d1f 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
-"PO-Revision-Date: 2016-11-20 15:56+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
+"PO-Revision-Date: 2016-11-22 15:12+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -5905,8 +5905,8 @@ msgid "FIFO pipe for remote control"
msgstr "Tube FIFO pour contrôle distant"
#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s : suppression du vieux tube \"%s\""
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s : pas assez de mémoire (%s)"
#, c-format
msgid "%s: pipe opened (file: %s)"
@@ -5963,15 +5963,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -5984,22 +5983,33 @@ msgstr ""
"\n"
"Le tube FIFO est utilisé comme contrôle à distance de WeeChat : vous pouvez "
"envoyer des commandes ou du texte au tube FIFO depuis votre shell.\n"
-"Par défaut le tube FIFO est dans ~/.weechat/weechat_fifo_xxx (\"xxx\" est le "
-"PID de WeeChat).\n"
+"Par défaut le tube FIFO est dans ~/.weechat/weechat_fifo\n"
"\n"
"Le format attendu est l'un des suivants :\n"
" plugin.buffer *texte ou commande ici\n"
" *texte ou commande ici\n"
"\n"
"Par exemple pour changer votre pseudo sur freenode :\n"
-" echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/"
-"weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo\n"
"\n"
"Merci de lire le guide utilisateur pour plus d'information et des exemples.\n"
"\n"
"Exemples :\n"
" /fifo toggle"
+msgid "enable FIFO pipe"
+msgstr "activer le tube FIFO"
+
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"chemin pour le tube FIFO ; \"%h\" au début de la chaîne est remplacé par le "
+"répertoire de base WeeChat (par défaut : \"~/.weechat\") ; le PID de WeeChat "
+"peut être utilisé dans le chemin avec ${info:pid} (note : le contenu est "
+"évalué, voir /help eval)"
+
msgid "name of FIFO pipe"
msgstr "nom du tube FIFO"
@@ -9535,10 +9545,6 @@ msgstr ""
"valeur actuelle est %d, essayez avec une valeur plus petite comme %d ou %d)"
#, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s : pas assez de mémoire (%s)"
-
-#, c-format
msgid "%s%s: timeout"
msgstr "%s%s : délai d'attente dépassé"
@@ -12702,3 +12708,6 @@ msgstr "%s%s : délai d'attente dépassé pour \"%s\" avec %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s : impossible de se connecter : erreur inattendue (%d)"
+
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s : suppression du vieux tube \"%s\""
diff --git a/po/hu.po b/po/hu.po
index f312f7852..30368e549 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-09-03 08:23+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4626,8 +4626,8 @@ msgid "FIFO pipe for remote control"
msgstr "%s nem sikerült a FIFO csövet létrehozni a távoli felügyelethez (%s)\n"
#, fuzzy, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s nincs elég memória az információs pult üzenethez\n"
+msgid "%s%s: not enough memory (%s)"
+msgstr "Nincs elég memória az új sorhoz\n"
#, fuzzy, c-format
msgid "%s: pipe opened (file: %s)"
@@ -4683,15 +4683,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -4699,6 +4698,18 @@ msgid ""
" /fifo toggle"
msgstr ""
+msgid "enable FIFO pipe"
+msgstr ""
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"modulok elérési útvonala ('%h' helyére automatikusan a WeeChat saját "
+"könyvtára, alapértelmezésben ~/.weechat, kerül)"
+
msgid "name of FIFO pipe"
msgstr ""
@@ -7857,10 +7868,6 @@ msgid ""
msgstr ""
#, fuzzy, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "Nincs elég memória az új sorhoz\n"
-
-#, fuzzy, c-format
msgid "%s%s: timeout"
msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
@@ -10688,3 +10695,7 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n"
+
+#, fuzzy
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s nincs elég memória az információs pult üzenethez\n"
diff --git a/po/it.po b/po/it.po
index 310375b99..e7110582e 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5439,9 +5439,9 @@ msgstr "colore del testo per le azioni sulla riga di input"
msgid "FIFO pipe for remote control"
msgstr "Pipe FIFO per il controllo remoto"
-#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s: rimozione della pipe fifo %s precedente"
+#, fuzzy, c-format
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s: memoria non sufficiente"
#, fuzzy, c-format
msgid "%s: pipe opened (file: %s)"
@@ -5499,15 +5499,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -5515,6 +5514,20 @@ msgid ""
" /fifo toggle"
msgstr ""
+#, fuzzy
+msgid "enable FIFO pipe"
+msgstr "nome della pipe FIFO"
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"path per i file di log di WeeChat: \"%h\" all'inizio della stringa viene "
+"sostituito dalla directory home di WeeChat (predefinita è \"~/.weechat); "
+"sono ammessi gli specificatori di data (consultare man strftime)"
+
msgid "name of FIFO pipe"
msgstr "nome della pipe FIFO"
@@ -8923,10 +8936,6 @@ msgstr ""
"%s%s: è necessario modificare l'opzione irc.server.%s.ssl_dhkey_size (il "
"valore corrente è %d)"
-#, fuzzy, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s: memoria non sufficiente"
-
#, c-format
msgid "%s%s: timeout"
msgstr "%s%s: timeout"
@@ -11835,3 +11844,6 @@ msgstr "%s%s: timeout per \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: impossibile connettersi al mittente"
+
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s: rimozione della pipe fifo %s precedente"
diff --git a/po/ja.po b/po/ja.po
index a78b65985..4840ac8f3 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-11-12 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -5635,8 +5635,8 @@ msgid "FIFO pipe for remote control"
msgstr "リモート操作用の FIFO パイプ"
#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s: 古い fifo パイプ \"%s\" の削除中"
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s: メモリが足りません (%s)"
#, c-format
msgid "%s: pipe opened (file: %s)"
@@ -5684,6 +5684,7 @@ msgstr "fifo プラグイン設定"
msgid "enable|disable|toggle"
msgstr "enable|disable|toggle"
+#, fuzzy
msgid ""
" enable: enable FIFO pipe\n"
"disable: disable FIFO pipe\n"
@@ -5691,15 +5692,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -5727,6 +5727,20 @@ msgstr ""
"例:\n"
" /fifo toggle"
+#, fuzzy
+msgid "enable FIFO pipe"
+msgstr "FIFO パイプの名前"
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"受信ファイルのパス: 文字列最初の \"%h\" は WeeChat ホーム に置換されます (デ"
+"フォルトでは \"~/.weechat\" に置換されます) (注意: 内容は評価されます、/help "
+"eval 参照)"
+
msgid "name of FIFO pipe"
msgstr "FIFO パイプの名前"
@@ -9166,10 +9180,6 @@ msgstr ""
"在の値は %d、%d や %d などの低い値を試してください)"
#, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s: メモリが足りません (%s)"
-
-#, c-format
msgid "%s%s: timeout"
msgstr "%s%s: タイムアウト"
@@ -12212,3 +12222,6 @@ msgstr "%s%s: \"%s\" のタイムアウト %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: 接続できません: 未定義のエラー (%d)"
+
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s: 古い fifo パイプ \"%s\" の削除中"
diff --git a/po/pl.po b/po/pl.po
index 43650d65a..376d32595 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Krzysztof Korościk <soltys1@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5763,8 +5763,8 @@ msgid "FIFO pipe for remote control"
msgstr "kolejka FIFO dla zdalnego sterowania"
#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s: usuwam stary strumień fifo \"%s\""
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s: za mało pamięci (%s)"
#, c-format
msgid "%s: pipe opened (file: %s)"
@@ -5813,6 +5813,7 @@ msgstr "konfiguracja wtyczki fifo"
msgid "enable|disable|toggle"
msgstr "enable|disable|toggle"
+#, fuzzy
msgid ""
" enable: enable FIFO pipe\n"
"disable: disable FIFO pipe\n"
@@ -5820,15 +5821,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -5856,6 +5856,20 @@ msgstr ""
"Przykłady:\n"
" /fifo toggle"
+#, fuzzy
+msgid "enable FIFO pipe"
+msgstr "nazwa strumienia FIFO"
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"ścieżka, do której zapisywane będą pliki przychodzące; \"%h\" na początku "
+"ciągu zostanie zastąpione przez katalog domowy WeeChat (domyślnie \"~/."
+"weechat\") (uwaga: zawartość jest przetwarzana, zobacz /help eval)"
+
msgid "name of FIFO pipe"
msgstr "nazwa strumienia FIFO"
@@ -9347,10 +9361,6 @@ msgstr ""
"wartość to %d, spróbuj niższej wartości jak %d lub %d)"
#, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s: za mało pamięci (%s)"
-
-#, c-format
msgid "%s%s: timeout"
msgstr "%s%s: timeout"
@@ -12440,3 +12450,6 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)"
+
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s: usuwam stary strumień fifo \"%s\""
diff --git a/po/pt.po b/po/pt.po
index c099a1964..8ce80812b 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-09-27 12:29+0000\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -5769,8 +5769,8 @@ msgid "FIFO pipe for remote control"
msgstr "pipe FIFO para controlo remoto"
#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s: a remover o pipe fifo antigo \"%s\""
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s: memória insuficiente (%s)"
#, c-format
msgid "%s: pipe opened (file: %s)"
@@ -5819,6 +5819,7 @@ msgstr "configuração do plugin fifo"
msgid "enable|disable|toggle"
msgstr "enable|disable|toggle"
+#, fuzzy
msgid ""
" enable: enable FIFO pipe\n"
"disable: disable FIFO pipe\n"
@@ -5826,15 +5827,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -5862,6 +5862,20 @@ msgstr ""
"Exemplos:\n"
" /fifo toggle"
+#, fuzzy
+msgid "enable FIFO pipe"
+msgstr "nome do pipe FIFO"
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"caminho onde escrever os ficheiros recebidos: \"%h\" no início da cadeia é "
+"substituído pelo diretório do WeeChat (\"~/.weechat\" por omissão) (nota: o "
+"conteúdo é avaliado, ver /help eval)"
+
msgid "name of FIFO pipe"
msgstr "nome do pipe FIFO"
@@ -9352,10 +9366,6 @@ msgstr ""
"%d, tente um valor menor tal como %d ou %d)"
#, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s: memória insuficiente (%s)"
-
-#, c-format
msgid "%s%s: timeout"
msgstr "%s%s: tempo limite"
@@ -12454,3 +12464,6 @@ msgstr "%s%s: tempo limite de \"%s\" com %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar: erro inesperado (%d)"
+
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s: a remover o pipe fifo antigo \"%s\""
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 6f11d65c4..a46a4b0e1 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5234,9 +5234,9 @@ msgstr "cor de texto para ações de linha de entrada"
msgid "FIFO pipe for remote control"
msgstr ""
-#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr ""
+#, fuzzy, c-format
+msgid "%s%s: not enough memory (%s)"
+msgstr "%s%s: memória insuficiente"
#, fuzzy, c-format
msgid "%s: pipe opened (file: %s)"
@@ -5293,15 +5293,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -5309,6 +5308,19 @@ msgid ""
" /fifo toggle"
msgstr ""
+msgid "enable FIFO pipe"
+msgstr ""
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"diretório para arquivos de registro do WeeChat; \"%h\" no início da string "
+"será substituído pelo diretório do WeeChat (\"~/.weechat\" por padrão); "
+"especificadores de data são permitidos (veja \"man strftime\")"
+
msgid "name of FIFO pipe"
msgstr ""
@@ -8282,10 +8294,6 @@ msgstr ""
"%d)"
#, fuzzy, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%s%s: memória insuficiente"
-
-#, fuzzy, c-format
msgid "%s%s: timeout"
msgstr "%s%s: tempo esgotado para \"%s\" com %s"
diff --git a/po/ru.po b/po/ru.po
index fb9a64983..9d0c60867 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4664,8 +4664,8 @@ msgid "FIFO pipe for remote control"
msgstr "%s не могу создать FIFO pipe для удалённого управления (%s)\n"
#, fuzzy, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr "%s недостаточно памяти для сообщения в строке информации\n"
+msgid "%s%s: not enough memory (%s)"
+msgstr "Недостаточно памяти для новой строчки\n"
#, fuzzy, c-format
msgid "%s: pipe opened (file: %s)"
@@ -4721,15 +4721,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -4737,6 +4736,18 @@ msgid ""
" /fifo toggle"
msgstr ""
+msgid "enable FIFO pipe"
+msgstr ""
+
+#, fuzzy
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+"путь поиска pluginов ('%h' заменяется на домашний каталог WeeChat, по "
+"умолчанию - ~/.weechat)"
+
msgid "name of FIFO pipe"
msgstr ""
@@ -7898,10 +7909,6 @@ msgid ""
msgstr ""
#, fuzzy, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "Недостаточно памяти для новой строчки\n"
-
-#, fuzzy, c-format
msgid "%s%s: timeout"
msgstr "%s нет аргумента для параметра \"%s\"\n"
@@ -10720,3 +10727,7 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: не могу соединиться с отправителем\n"
+
+#, fuzzy
+#~ msgid "%s: removing old fifo pipe \"%s\""
+#~ msgstr "%s недостаточно памяти для сообщения в строке информации\n"
diff --git a/po/srcfiles.cmake b/po/srcfiles.cmake
index 4442cbea8..e798b5fb9 100644
--- a/po/srcfiles.cmake
+++ b/po/srcfiles.cmake
@@ -137,6 +137,8 @@ SET(WEECHAT_SOURCES
./src/plugins/fifo/fifo.h
./src/plugins/fifo/fifo-command.c
./src/plugins/fifo/fifo-command.h
+./src/plugins/fifo/fifo-config.c
+./src/plugins/fifo/fifo-config.h
./src/plugins/fifo/fifo-info.c
./src/plugins/fifo/fifo-info.h
./src/plugins/guile/weechat-guile-api.c
diff --git a/po/tr.po b/po/tr.po
index ea3073e04..c2740a7eb 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2016-05-18 07:43+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4221,9 +4221,9 @@ msgstr "kanal isimleri için metin rengi"
msgid "FIFO pipe for remote control"
msgstr ""
-#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
-msgstr ""
+#, fuzzy, c-format
+msgid "%s%s: not enough memory (%s)"
+msgstr "%sYeterli bellek yok"
#, fuzzy, c-format
msgid "%s: pipe opened (file: %s)"
@@ -4279,15 +4279,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -4295,6 +4294,15 @@ msgid ""
" /fifo toggle"
msgstr ""
+msgid "enable FIFO pipe"
+msgstr ""
+
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+
msgid "name of FIFO pipe"
msgstr ""
@@ -7118,10 +7126,6 @@ msgid ""
"value is %d, try a lower value like %d or %d)"
msgstr ""
-#, fuzzy, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr "%sYeterli bellek yok"
-
#, c-format
msgid "%s%s: timeout"
msgstr "%s%s: zaman aşımı"
diff --git a/po/weechat.pot b/po/weechat.pot
index 26a18ff91..83182ae0d 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2016-11-20 15:55+0100\n"
+"POT-Creation-Date: 2016-11-22 15:12+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4204,7 +4204,7 @@ msgid "FIFO pipe for remote control"
msgstr ""
#, c-format
-msgid "%s: removing old fifo pipe \"%s\""
+msgid "%s%s: not enough memory (%s)"
msgstr ""
#, c-format
@@ -4260,15 +4260,14 @@ msgid ""
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send commands or "
"text to the FIFO pipe from your shell.\n"
-"By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx (\"xxx\" is the "
-"WeeChat PID).\n"
+"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
" *text or command here\n"
"\n"
"For example to change your freenode nick:\n"
-" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345\n"
+" echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
@@ -4276,6 +4275,15 @@ msgid ""
" /fifo toggle"
msgstr ""
+msgid "enable FIFO pipe"
+msgstr ""
+
+msgid ""
+"path for FIFO file; \"%h\" at beginning of string is replaced by WeeChat "
+"home (\"~/.weechat\" by default); WeeChat PID can be used in path with "
+"${info:pid} (note: content is evaluated, see /help eval)"
+msgstr ""
+
msgid "name of FIFO pipe"
msgstr ""
@@ -7043,10 +7051,6 @@ msgid ""
msgstr ""
#, c-format
-msgid "%s%s: not enough memory (%s)"
-msgstr ""
-
-#, c-format
msgid "%s%s: timeout"
msgstr ""
diff --git a/src/plugins/fifo/CMakeLists.txt b/src/plugins/fifo/CMakeLists.txt
index b1c27b62f..c6cd64e83 100644
--- a/src/plugins/fifo/CMakeLists.txt
+++ b/src/plugins/fifo/CMakeLists.txt
@@ -20,6 +20,7 @@
add_library(fifo MODULE
fifo.c fifo.h
fifo-command.c fifo-command.h
+fifo-config.c fifo-config.h
fifo-info.c fifo-info.h)
set_target_properties(fifo PROPERTIES PREFIX "")
diff --git a/src/plugins/fifo/Makefile.am b/src/plugins/fifo/Makefile.am
index 8a51e9fb2..09f153c38 100644
--- a/src/plugins/fifo/Makefile.am
+++ b/src/plugins/fifo/Makefile.am
@@ -27,6 +27,8 @@ fifo_la_SOURCES = fifo.c \
fifo.h \
fifo-command.c \
fifo-command.h \
+ fifo-config.c \
+ fifo-config.h \
fifo-info.c \
fifo-info.h
fifo_la_LDFLAGS = -module -no-undefined
diff --git a/src/plugins/fifo/fifo-command.c b/src/plugins/fifo/fifo-command.c
index 19ea553a5..58e5c6ca7 100644
--- a/src/plugins/fifo/fifo-command.c
+++ b/src/plugins/fifo/fifo-command.c
@@ -23,6 +23,7 @@
#include "../weechat-plugin.h"
#include "fifo.h"
+#include "fifo-config.h"
/*
@@ -60,22 +61,24 @@ fifo_command_fifo (const void *pointer, void *data,
/* enable pipe */
if (weechat_strcasecmp (argv[1], "enable") == 0)
{
- weechat_config_set_plugin (FIFO_OPTION_NAME, "on");
+ weechat_config_option_set (fifo_config_file_enabled, "on", 1);
return WEECHAT_RC_OK;
}
/* disable pipe */
if (weechat_strcasecmp (argv[1], "disable") == 0)
{
- weechat_config_set_plugin (FIFO_OPTION_NAME, "off");
+ weechat_config_option_set (fifo_config_file_enabled, "off", 1);
return WEECHAT_RC_OK;
}
/* toggle pipe */
if (weechat_strcasecmp (argv[1], "toggle") == 0)
{
- weechat_config_set_plugin (FIFO_OPTION_NAME,
- (fifo_fd == -1) ? "on" : "off");
+ weechat_config_option_set (
+ fifo_config_file_enabled,
+ (weechat_config_boolean (fifo_config_file_enabled)) ? "off" : "on",
+ 1);
return WEECHAT_RC_OK;
}
@@ -99,8 +102,7 @@ fifo_command_init ()
"\n"
"FIFO pipe is used as remote control of WeeChat: you can send "
"commands or text to the FIFO pipe from your shell.\n"
- "By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx "
- "(\"xxx\" is the WeeChat PID).\n"
+ "By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
"\n"
"The expected format is one of:\n"
" plugin.buffer *text or command here\n"
@@ -108,7 +110,7 @@ fifo_command_init ()
"\n"
"For example to change your freenode nick:\n"
" echo 'irc.server.freenode */nick newnick' "
- ">~/.weechat/weechat_fifo_12345\n"
+ ">~/.weechat/weechat_fifo\n"
"\n"
"Please read the user's guide for more info and examples.\n"
"\n"
diff --git a/src/plugins/fifo/fifo-config.c b/src/plugins/fifo/fifo-config.c
new file mode 100644
index 000000000..43b9919be
--- /dev/null
+++ b/src/plugins/fifo/fifo-config.c
@@ -0,0 +1,160 @@
+/*
+ * fifo-config.c - fifo configuration options (file fifo.conf)
+ *
+ * Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org>
+ *
+ * This file is part of WeeChat, the extensible chat client.
+ *
+ * WeeChat 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.
+ *
+ * WeeChat 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 WeeChat. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdlib.h>
+
+#include "../weechat-plugin.h"
+#include "fifo.h"
+#include "fifo-config.h"
+
+
+struct t_config_file *fifo_config_file = NULL;
+
+/* fifo config, file section */
+
+struct t_config_option *fifo_config_file_enabled;
+struct t_config_option *fifo_config_file_path;
+
+
+/*
+ * Callback for changes on option "enabled".
+ */
+
+void
+fifo_config_change_file_enabled (const void *pointer, void *data,
+ struct t_config_option *option)
+{
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) option;
+
+ fifo_remove ();
+
+ if (weechat_config_boolean (fifo_config_file_enabled))
+ fifo_create();
+}
+
+/*
+ * Callback for changes on option "path".
+ */
+
+void
+fifo_config_change_file_path (const void *pointer, void *data,
+ struct t_config_option *option)
+{
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) option;
+
+ fifo_quiet = 1;
+
+ fifo_remove ();
+ fifo_create ();
+
+ fifo_quiet = 0;
+}
+
+/*
+ * Initializes fifo configuration file.
+ *
+ * Returns:
+ * 1: OK
+ * 0: error
+ */
+
+int
+fifo_config_init ()
+{
+ struct t_config_section *ptr_section;
+
+ fifo_config_file = weechat_config_new (FIFO_CONFIG_NAME,
+ NULL, NULL, NULL);
+ if (!fifo_config_file)
+ return 0;
+
+ /* file */
+ ptr_section = weechat_config_new_section (fifo_config_file, "file",
+ 0, 0,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL);
+ if (!ptr_section)
+ {
+ weechat_config_free (fifo_config_file);
+ return 0;
+ }
+
+ fifo_config_file_enabled = weechat_config_new_option (
+ fifo_config_file, ptr_section,
+ "enabled", "boolean",
+ N_("enable FIFO pipe"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL,
+ &fifo_config_change_file_enabled, NULL, NULL,
+ NULL, NULL, NULL);
+ fifo_config_file_path = weechat_config_new_option (
+ fifo_config_file, ptr_section,
+ "path", "string",
+ N_("path for FIFO file; \"%h\" at beginning of string is "
+ "replaced by WeeChat home (\"~/.weechat\" by default); "
+ "WeeChat PID can be used in path with ${info:pid} "
+ "(note: content is evaluated, see /help eval)"),
+ NULL, 0, 0, "%h/weechat_fifo", NULL, 0,
+ NULL, NULL, NULL,
+ fifo_config_change_file_path, NULL, NULL,
+ NULL, NULL, NULL);
+
+ return 1;
+}
+
+/*
+ * Reads fifo configuration file.
+ */
+
+int
+fifo_config_read ()
+{
+ return weechat_config_read (fifo_config_file);
+}
+
+/*
+ * Writes fifo configuration file.
+ */
+
+int
+fifo_config_write ()
+{
+ return weechat_config_write (fifo_config_file);
+}
+
+/*
+ * Frees fifo configuration.
+ */
+
+void
+fifo_config_free ()
+{
+ weechat_config_free (fifo_config_file);
+}
diff --git a/src/plugins/fifo/fifo-config.h b/src/plugins/fifo/fifo-config.h
new file mode 100644
index 000000000..fd531e4e9
--- /dev/null
+++ b/src/plugins/fifo/fifo-config.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org>
+ *
+ * This file is part of WeeChat, the extensible chat client.
+ *
+ * WeeChat 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.
+ *
+ * WeeChat 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 WeeChat. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef WEECHAT_FIFO_CONFIG_H
+#define WEECHAT_FIFO_CONFIG_H 1
+
+#define FIFO_CONFIG_NAME "fifo"
+
+
+extern struct t_config_option *fifo_config_file_enabled;
+extern struct t_config_option *fifo_config_file_path;
+
+extern int fifo_config_init ();
+extern int fifo_config_read ();
+extern int fifo_config_write ();
+extern void fifo_config_free ();
+
+#endif /* WEECHAT_FIFO_CONFIG_H */
diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c
index e438fc4a1..9bebc2b9a 100644
--- a/src/plugins/fifo/fifo.c
+++ b/src/plugins/fifo/fifo.c
@@ -33,6 +33,7 @@
#include "../weechat-plugin.h"
#include "fifo.h"
#include "fifo-command.h"
+#include "fifo-config.h"
#include "fifo-info.h"
@@ -43,15 +44,13 @@ WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
WEECHAT_PLUGIN_PRIORITY(7000);
-#define FIFO_FILENAME_PREFIX "weechat_fifo_"
-
struct t_weechat_plugin *weechat_fifo_plugin = NULL;
#define weechat_plugin weechat_fifo_plugin
int fifo_quiet = 0;
int fifo_fd = -1;
struct t_hook *fifo_fd_hook = NULL;
-char *fifo_filename;
+char *fifo_filename = NULL;
char *fifo_unterminated = NULL;
@@ -59,130 +58,78 @@ int fifo_fd_cb ();
/*
- * Removes old FIFO pipes in directory.
+ * Creates FIFO pipe for remote control.
*/
void
-fifo_remove_old_pipes ()
+fifo_create ()
{
- char *buf;
- int buf_len, prefix_len;
- const char *weechat_home, *dir_separator;
- DIR *dp;
- struct dirent *entry;
- struct stat statbuf;
-
- buf_len = PATH_MAX;
- buf = malloc (buf_len);
- if (!buf)
- return;
-
- weechat_home = weechat_info_get ("weechat_dir", "");
- dir_separator = weechat_info_get ("dir_separator", "");
+ struct stat st;
- prefix_len = strlen (FIFO_FILENAME_PREFIX);
+ if (!weechat_config_boolean (fifo_config_file_enabled))
+ return;
- dp = opendir (weechat_home);
- if (dp != NULL)
+ if (!fifo_filename)
{
- while ((entry = readdir (dp)) != NULL)
- {
- if (strcmp (entry->d_name, ".") == 0 || strcmp (entry->d_name, "..") == 0)
- continue;
-
- if (strncmp (entry->d_name, FIFO_FILENAME_PREFIX, prefix_len) == 0)
- {
- snprintf (buf, buf_len, "%s%s%s",
- weechat_home, dir_separator, entry->d_name);
- if (stat (buf, &statbuf) != -1)
- {
- weechat_printf (NULL,
- _("%s: removing old fifo pipe \"%s\""),
- FIFO_PLUGIN_NAME, buf);
- unlink (buf);
- }
- }
- }
- closedir (dp);
+ /* replace %h and "~", evaluate path */
+ fifo_filename = weechat_string_eval_path_home (
+ weechat_config_string (fifo_config_file_path),
+ NULL, NULL, NULL);
}
- free (buf);
-}
-
-/*
- * Creates FIFO pipe for remote control.
- */
-
-void
-fifo_create ()
-{
- int filename_length;
- const char *fifo_option, *weechat_home;
+ if (!fifo_filename)
+ {
+ weechat_printf (NULL,
+ _("%s%s: not enough memory (%s)"),
+ weechat_prefix ("error"), FIFO_PLUGIN_NAME,
+ "fifo_filename");
+ return;
+ }
- fifo_option = weechat_config_get_plugin ("fifo");
- if (!fifo_option)
+ /* remove a pipe with same name (if exists) */
+ if (stat (fifo_filename, &st) == 0)
{
- weechat_config_set_plugin ("fifo", "on");
- fifo_option = weechat_config_get_plugin ("fifo");
+ /* if the file is a FIFO pipe, delete it */
+ if (S_ISFIFO(st.st_mode))
+ unlink (fifo_filename);
}
- weechat_home = weechat_info_get ("weechat_dir", "");
+ fifo_fd = -1;
- if (fifo_option && weechat_home)
+ /* create FIFO pipe, writable for user only */
+ if (mkfifo (fifo_filename, 0600) == 0)
{
- fifo_remove_old_pipes ();
-
- if (weechat_strcasecmp (fifo_option, "on") == 0)
+ /* open FIFO pipe in read-only, non-blocking mode */
+ if ((fifo_fd = open (fifo_filename,
+ O_RDONLY | O_NONBLOCK)) != -1)
{
- /*
- * build FIFO filename:
- * "<weechat_home>/weechat_fifo_" + process PID
- */
- if (!fifo_filename)
- {
- filename_length = strlen (weechat_home) + 64;
- fifo_filename = malloc (filename_length);
- snprintf (fifo_filename, filename_length,
- "%s/%s%d",
- weechat_home, FIFO_FILENAME_PREFIX, (int) getpid());
- }
-
- fifo_fd = -1;
-
- /* create FIFO pipe, writable for user only */
- if (mkfifo (fifo_filename, 0600) == 0)
- {
- /* open FIFO pipe in read-only, non-blocking mode */
- if ((fifo_fd = open (fifo_filename,
- O_RDONLY | O_NONBLOCK)) != -1)
- {
- if ((weechat_fifo_plugin->debug >= 1) || !fifo_quiet)
- {
- weechat_printf (NULL,
- _("%s: pipe opened (file: %s)"),
- FIFO_PLUGIN_NAME,
- fifo_filename);
- }
- fifo_fd_hook = weechat_hook_fd (fifo_fd, 1, 0, 0,
- &fifo_fd_cb, NULL, NULL);
- }
- else
- weechat_printf (NULL,
- _("%s%s: unable to open pipe (%s) for "
- "reading"),
- weechat_prefix ("error"), FIFO_PLUGIN_NAME,
- fifo_filename);
- }
- else
+ if ((weechat_fifo_plugin->debug >= 1) || !fifo_quiet)
{
weechat_printf (NULL,
- _("%s%s: unable to create pipe for remote "
- "control (%s): error %d %s"),
- weechat_prefix ("error"), FIFO_PLUGIN_NAME,
- fifo_filename, errno, strerror (errno));
+ _("%s: pipe opened (file: %s)"),
+ FIFO_PLUGIN_NAME,
+ fifo_filename);
}
+ fifo_fd_hook = weechat_hook_fd (fifo_fd, 1, 0, 0,
+ &fifo_fd_cb, NULL, NULL);
+ }
+ else
+ {
+ weechat_printf (NULL,
+ _("%s%s: unable to open pipe (%s) for "
+ "reading"),
+ weechat_prefix ("error"), FIFO_PLUGIN_NAME,
+ fifo_filename);
}
}
+ else
+ {
+ weechat_printf (NULL,
+ _("%s%s: unable to create pipe for remote "
+ "control (%s): error %d %s"),
+ weechat_prefix ("error"), FIFO_PLUGIN_NAME,
+ fifo_filename, errno, strerror (errno));
+ }
}
/*
@@ -192,6 +139,10 @@ fifo_create ()
void
fifo_remove ()
{
+ int fifo_found;
+
+ fifo_found = (fifo_fd != -1);
+
/* remove fd hook */
if (fifo_fd_hook)
{
@@ -206,10 +157,6 @@ fifo_remove ()
fifo_fd = -1;
}
- /* remove FIFO from disk */
- if (fifo_filename)
- unlink (fifo_filename);
-
/* remove any unterminated message */
if (fifo_unterminated)
{
@@ -217,16 +164,20 @@ fifo_remove ()
fifo_unterminated = NULL;
}
- /* free filename */
+ /* remove FIFO from disk */
if (fifo_filename)
{
+ unlink (fifo_filename);
free (fifo_filename);
fifo_filename = NULL;
}
- weechat_printf (NULL,
- _("%s: pipe closed"),
- FIFO_PLUGIN_NAME);
+ if (fifo_found && !fifo_quiet)
+ {
+ weechat_printf (NULL,
+ _("%s: pipe closed"),
+ FIFO_PLUGIN_NAME);
+ }
}
/*
@@ -398,55 +349,27 @@ fifo_fd_cb (const void *pointer, void *data, int fd)
}
/*
- * Callback for changes on option "plugins.var.fifo.fifo".
- */
-
-int
-fifo_config_cb (const void *pointer, void *data,
- const char *option, const char *value)
-{
- /* make C compiler happy */
- (void) pointer;
- (void) data;
- (void) option;
-
- if (weechat_strcasecmp (value, "on") == 0)
- {
- if (fifo_fd < 0)
- fifo_create ();
- }
- else
- {
- if (fifo_fd >= 0)
- fifo_remove ();
- }
-
- return WEECHAT_RC_OK;
-}
-
-/*
* Initializes fifo plugin.
*/
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
- char str_option[256];
-
/* make C compiler happy */
(void) argc;
(void) argv;
weechat_plugin = plugin;
+ if (!fifo_config_init ())
+ return WEECHAT_RC_ERROR;
+
+ fifo_config_read ();
+
fifo_quiet = 1;
fifo_create ();
- snprintf (str_option, sizeof (str_option),
- "plugins.var.fifo.%s", FIFO_OPTION_NAME);
- weechat_hook_config (str_option, &fifo_config_cb, NULL, NULL);
-
fifo_command_init ();
fifo_info_init ();
@@ -467,5 +390,8 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
fifo_remove ();
+ fifo_config_write ();
+ fifo_config_free ();
+
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/fifo/fifo.h b/src/plugins/fifo/fifo.h
index 35eb72b0d..22528fb09 100644
--- a/src/plugins/fifo/fifo.h
+++ b/src/plugins/fifo/fifo.h
@@ -25,7 +25,11 @@
#define FIFO_OPTION_NAME "fifo"
extern struct t_weechat_plugin *weechat_fifo_plugin;
+extern int fifo_quiet;
extern int fifo_fd;
extern char *fifo_filename;
+extern void fifo_create ();
+extern void fifo_remove ();
+
#endif /* WEECHAT_FIFO_H */