summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-09-19 13:55:27 +0200
committerSebastien Helleu <flashcode@flashtux.org>2013-09-19 15:11:51 +0200
commite900579fbaf1185aaefb9dc0463bbeadfd9fe1a8 (patch)
treef2cbb7067ef1348f6a975497a20096b59d0538db
parent252feedde4ed4c67c2790da16aec955cc39ba098 (diff)
downloadweechat-e900579fbaf1185aaefb9dc0463bbeadfd9fe1a8.zip
relay: add support of secured data in option relay.network.password (evaluate content) (patch from Nils Görs)
-rw-r--r--doc/de/autogen/user/relay_options.txt2
-rw-r--r--doc/de/autogen/user/weechat_commands.txt55
-rw-r--r--doc/en/autogen/user/relay_options.txt2
-rw-r--r--doc/en/autogen/user/weechat_commands.txt1
-rw-r--r--doc/fr/autogen/user/relay_options.txt2
-rw-r--r--doc/fr/autogen/user/weechat_commands.txt1
-rw-r--r--doc/it/autogen/user/relay_options.txt2
-rw-r--r--doc/it/autogen/user/weechat_commands.txt1
-rw-r--r--doc/ja/autogen/user/relay_options.txt2
-rw-r--r--doc/ja/autogen/user/weechat_commands.txt47
-rw-r--r--po/cs.po6
-rw-r--r--po/de.po25
-rw-r--r--po/es.po6
-rw-r--r--po/fr.po11
-rw-r--r--po/hu.po5
-rw-r--r--po/it.po6
-rw-r--r--po/ja.po7
-rw-r--r--po/pl.po10
-rw-r--r--po/pt_BR.po6
-rw-r--r--po/ru.po8
-rw-r--r--po/tr.po5
-rw-r--r--po/weechat.pot5
-rw-r--r--src/core/wee-command.c1
-rw-r--r--src/plugins/relay/irc/relay-irc.c23
-rw-r--r--src/plugins/relay/relay-config.c3
-rw-r--r--src/plugins/relay/weechat/relay-weechat-protocol.c11
-rw-r--r--src/plugins/relay/weechat/relay-weechat.c8
27 files changed, 155 insertions, 106 deletions
diff --git a/doc/de/autogen/user/relay_options.txt b/doc/de/autogen/user/relay_options.txt
index 2b3eae798..2aea004ab 100644
--- a/doc/de/autogen/user/relay_options.txt
+++ b/doc/de/autogen/user/relay_options.txt
@@ -104,7 +104,7 @@
** Werte: 1 .. 1024 (Standardwert: `5`)
* [[option_relay.network.password]] *relay.network.password*
-** Beschreibung: `Passwort wird von Clients benötigt um Zugriff auf dieses Relay zu erhalten (kein Eintrag bedeutet dass kein Passwort benötigt wird)`
+** Beschreibung: `password required by clients to access this relay (empty value means no password required) (note: content is evaluated, see /help eval)`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `""`)
diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt
index 65bc908b1..80cb93d3f 100644
--- a/doc/de/autogen/user/weechat_commands.txt
+++ b/doc/de/autogen/user/weechat_commands.txt
@@ -622,35 +622,36 @@ Wird keine Datei angegeben dann werden alle Konfigurationen (WeeChat und Erweite
set <name> <value>
del <name>
-passphrase: ändern der Passphrase (ohne Passphrase, werden die Daten in der Datei sec.conf in Klartext gesichert)
- -delete: löscht Passphrase
- decrypt: entschlüsselt Daten nachträglich (dies passiert nur die Passphrase beim Start nicht angegeben wurde)
- -discard: verwirft alle verschlüsselten Daten
- set: ändert eine schutzwürdige Information oder fügt eine hinzu
- del: entfernt eine schutzwürdige Information
-
-Ohne Angabe von Argumenten wird ein neuer Buffer geöffnet und die geschützten Daten können dort eingesehen werden.
-
-Wird eine Passphrase verwendet (Daten liegen verschlüsselt vor), fragt WeeChat beim Start nach der Passphrase.
-Es ist möglich eine Umgebungsvariable "WEECHAT_PASSPHRASE" zu setzen um die Eingabeaufforderung beim Programmstart zu vermeiden (diese Variable wird auch von WeeChat beim /upgrade verwendet).
-
-schutzwürdige Daten mit dem Format ${sec.data.xxx} können wie folgt genutzt werden:
- - Argument in der Befehlszeile für "--run-command"
- - IRC Server Optionen: autojoin, command, password, sasl_{username|password}
- - Option weechat.startup.command_{before|after}_plugins
- - Befehl /eval.
-
-Beispiele:
- setzen einer Passphrase:
- /secure passphrase Dies ist meine Passphrase
- verschlüsselt freenode SASL Passwort:
- /secure set freenode meinPasswort
+passphrase: change the passphrase (without passphrase, data is stored as plain text in file sec.conf)
+ -delete: delete passphrase
+ decrypt: decrypt data still encrypted (it happens only if passphrase was not given on startup)
+ -discard: discard all data still encrypted
+ set: add or change secured data
+ del: delete secured data
+
+Without argument, this command displays secured data in a new buffer.
+
+When a passphrase is used (data encrypted), it is asked by WeeChat on startup.
+It is possible to set environment variable "WEECHAT_PASSPHRASE" to prevent the prompt (this same variable is used by WeeChat on /upgrade).
+
+Secured data with format ${sec.data.xxx} can be used in:
+ - command line argument "--run-command"
+ - irc server options: autojoin, command, password, sasl_{username|password}
+ - option relay.network.password
+ - options weechat.startup.command_{before|after}_plugins
+ - command /eval.
+
+Examples:
+ set a passphrase:
+ /secure passphrase this is my passphrase
+ encrypt freenode SASL password:
+ /secure set freenode mypassword
/set irc.server.freenode.sasl_password "${sec.data.freenode}"
- verschlüsselt oftc Passwort für nickserv:
- /secure set oftc meinPasswort
+ encrypt oftc password for nickserv:
+ /secure set oftc mypassword
/set irc.server.oftc.command "/msg nickserv identify ${sec.data.oftc}"
- alias um den eigenen Nick zu ghosten:
- /alias ghost /eval /msg -server freenode nickserv ghost meinNick ${sec.data.freenode}
+ alias to ghost the nick "mynick":
+ /alias ghost /eval /msg -server freenode nickserv ghost mynick ${sec.data.freenode}
........................................
[[command_weechat_set]]
diff --git a/doc/en/autogen/user/relay_options.txt b/doc/en/autogen/user/relay_options.txt
index 8e0253657..ee41354cf 100644
--- a/doc/en/autogen/user/relay_options.txt
+++ b/doc/en/autogen/user/relay_options.txt
@@ -104,7 +104,7 @@
** values: 1 .. 1024 (default value: `5`)
* [[option_relay.network.password]] *relay.network.password*
-** description: `password required by clients to access this relay (empty value means no password required)`
+** description: `password required by clients to access this relay (empty value means no password required) (note: content is evaluated, see /help eval)`
** type: string
** values: any string (default value: `""`)
diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt
index 0f007aade..68caff3bb 100644
--- a/doc/en/autogen/user/weechat_commands.txt
+++ b/doc/en/autogen/user/weechat_commands.txt
@@ -637,6 +637,7 @@ It is possible to set environment variable "WEECHAT_PASSPHRASE" to prevent the p
Secured data with format ${sec.data.xxx} can be used in:
- command line argument "--run-command"
- irc server options: autojoin, command, password, sasl_{username|password}
+ - option relay.network.password
- options weechat.startup.command_{before|after}_plugins
- command /eval.
diff --git a/doc/fr/autogen/user/relay_options.txt b/doc/fr/autogen/user/relay_options.txt
index 15b45b5ef..aa7b9c0e7 100644
--- a/doc/fr/autogen/user/relay_options.txt
+++ b/doc/fr/autogen/user/relay_options.txt
@@ -104,7 +104,7 @@
** valeurs: 1 .. 1024 (valeur par défaut: `5`)
* [[option_relay.network.password]] *relay.network.password*
-** description: `mot de passe requis par les clients pour accéder à ce relai (une valeur vide indique que le mot de passe n'est pas nécessaire)`
+** description: `mot de passe requis par les clients pour accéder à ce relai (une valeur vide indique que le mot de passe n'est pas nécessaire) (note: le contenu est évalué, voir /help eval)`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `""`)
diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt
index d759b1478..3a24caf22 100644
--- a/doc/fr/autogen/user/weechat_commands.txt
+++ b/doc/fr/autogen/user/weechat_commands.txt
@@ -637,6 +637,7 @@ Il est possible de définir la variable d'environnement WEECHAT_PASSPHRASE pour
Les données sécurisées avec le format ${sec.data.xxx} peuvent être utilisées dans :
- le paramètre de ligne de commande "--run-command"
- les options de serveur irc: autojoin, command, password, sasl_{username|password}
+ - l'option relay.network.password
- les options weechat.startup.command_{before|after}_plugins
- la commande /eval.
diff --git a/doc/it/autogen/user/relay_options.txt b/doc/it/autogen/user/relay_options.txt
index 986d37acf..cba008d27 100644
--- a/doc/it/autogen/user/relay_options.txt
+++ b/doc/it/autogen/user/relay_options.txt
@@ -104,7 +104,7 @@
** valori: 1 .. 1024 (valore predefinito: `5`)
* [[option_relay.network.password]] *relay.network.password*
-** descrizione: `password richiesta dai client per accedere a questo relay (un valore nullo corrisponde a nessuna password richiesta)`
+** descrizione: `password required by clients to access this relay (empty value means no password required) (note: content is evaluated, see /help eval)`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `""`)
diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt
index 308f29c8e..6c12f01d5 100644
--- a/doc/it/autogen/user/weechat_commands.txt
+++ b/doc/it/autogen/user/weechat_commands.txt
@@ -637,6 +637,7 @@ It is possible to set environment variable "WEECHAT_PASSPHRASE" to prevent the p
Secured data with format ${sec.data.xxx} can be used in:
- command line argument "--run-command"
- irc server options: autojoin, command, password, sasl_{username|password}
+ - option relay.network.password
- options weechat.startup.command_{before|after}_plugins
- command /eval.
diff --git a/doc/ja/autogen/user/relay_options.txt b/doc/ja/autogen/user/relay_options.txt
index 153116dcd..feafecf52 100644
--- a/doc/ja/autogen/user/relay_options.txt
+++ b/doc/ja/autogen/user/relay_options.txt
@@ -104,7 +104,7 @@
** 値: 1 .. 1024 (デフォルト値: `5`)
* [[option_relay.network.password]] *relay.network.password*
-** 説明: `このリレーを利用するためにクライアントが必要なパスワード (空の場合パスワードなし)`
+** 説明: `password required by clients to access this relay (empty value means no password required) (note: content is evaluated, see /help eval)`
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `""`)
diff --git a/doc/ja/autogen/user/weechat_commands.txt b/doc/ja/autogen/user/weechat_commands.txt
index ad91b636e..e7c91da0b 100644
--- a/doc/ja/autogen/user/weechat_commands.txt
+++ b/doc/ja/autogen/user/weechat_commands.txt
@@ -622,34 +622,35 @@ file: 保存する設定ファイル (拡張子 ".conf" は不要)
set <name> <value>
del <name>
-passphrase: パスフレーズを変更 (パスフレーズがない場合、sec.conf ファイルに平文でデータを保存します)
- -delete: パスフレーズを削除
- decrypt: 暗号化されているデータを復号化 (起動時にパスフレーズが設定されていない場合に起きます)
- -discard: 全ての暗号化データを破棄
- set: 保護データを追加または変更
- del: 保護データを削除
-
-引数がない場合、新しいバッファに保護データを表示します。
-
-パスフレーズを利用する場合 (データが暗号化されている場合)、WeeChat は起動時にパスフレーズを尋ねます。
-環境変数 "WEECHAT_PASSPHRASE" を利用すれば入力を回避できます (WeeChat は /upgrade の時に同じ変数を利用します)。
-
-${sec.data.xxx} の形でフォーマットされた保護データは以下の様に利用できます:
- - コマンドライン引数 "--run-command"
- - irc サーバオプション: autojoin、command、password、sasl_{username|password}
- - weechat.startup.command_{before|after}_plugins オプション
- - /eval コマンド。
-
-例:
- パスフレーズを設定:
+passphrase: change the passphrase (without passphrase, data is stored as plain text in file sec.conf)
+ -delete: delete passphrase
+ decrypt: decrypt data still encrypted (it happens only if passphrase was not given on startup)
+ -discard: discard all data still encrypted
+ set: add or change secured data
+ del: delete secured data
+
+Without argument, this command displays secured data in a new buffer.
+
+When a passphrase is used (data encrypted), it is asked by WeeChat on startup.
+It is possible to set environment variable "WEECHAT_PASSPHRASE" to prevent the prompt (this same variable is used by WeeChat on /upgrade).
+
+Secured data with format ${sec.data.xxx} can be used in:
+ - command line argument "--run-command"
+ - irc server options: autojoin, command, password, sasl_{username|password}
+ - option relay.network.password
+ - options weechat.startup.command_{before|after}_plugins
+ - command /eval.
+
+Examples:
+ set a passphrase:
/secure passphrase this is my passphrase
- freenode の SASL パスワードを暗号化:
+ encrypt freenode SASL password:
/secure set freenode mypassword
/set irc.server.freenode.sasl_password "${sec.data.freenode}"
- oftc の nickserv 用パスワードを暗号化:
+ encrypt oftc password for nickserv:
/secure set oftc mypassword
/set irc.server.oftc.command "/msg nickserv identify ${sec.data.oftc}"
- ニックネーム "mynick" を取り戻すためのエイリアス ghost を設定
+ alias to ghost the nick "mynick":
/alias ghost /eval /msg -server freenode nickserv ghost mynick ${sec.data.freenode}
........................................
diff --git a/po/cs.po b/po/cs.po
index 9fe4fc312..03d1fca4f 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-02 21:20+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1996,6 +1996,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -8350,9 +8351,10 @@ msgstr ""
msgid "maximum number of clients connecting to a port"
msgstr "maximální počet klientů připojených k portu"
+#, fuzzy
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
"heslo vyžadované klienty pro přístup k tomuto přesměrováni (prázdná hodnota "
"značí, že heslo není vyžadováno)"
diff --git a/po/de.po b/po/de.po
index 79cdd87b9..c63b3f4dd 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-16 22:50+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@@ -368,11 +368,11 @@ msgid "color"
msgstr "Farbe"
msgid ""
-"a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)"
-"green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal "
-"color number or an alias; attributes are allowed before color (for text "
-"color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" for "
-"underline"
+"a WeeChat color name (default, black, (dark)gray, white, (light)red, "
+"(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a "
+"terminal color number or an alias; attributes are allowed before color (for "
+"text color only, not background): \"*\" for bold, \"!\" for reverse, \"_\" "
+"for underline"
msgstr ""
"ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, "
"(light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine "
@@ -2210,6 +2210,7 @@ msgstr ""
"passphrase <passphrase>|-delete || decrypt <passphrase>|-discard || set "
"<name> <value> || del <name>"
+#, fuzzy
msgid ""
"passphrase: change the passphrase (without passphrase, data is stored as "
"plain text in file sec.conf)\n"
@@ -2231,6 +2232,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -3069,8 +3071,8 @@ msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
-"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
-"FlashCode|flashy\""
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-"
+"i)FlashCode|flashy\""
msgstr ""
"Suchmuster (regulärer Ausdruck) welches genutzt werden soll, um zu "
"überprüfen ob eine Nachricht ein Highlight enthält oder nicht. Mindestens "
@@ -5468,8 +5470,8 @@ msgstr ""
"werden)\n"
" - Hostname/Port oder IP/Port (damit wird lediglich ein "
"TEMPORÄRER Server erstellt), Port 6667 wird standardmäßig verwendet\n"
-" - URL mit folgendem Format: irc[6][s]://[nickname[:password]@]"
-"irc.example.org[:port][/#channel1][,#channel2[...]]\n"
+" - URL mit folgendem Format: irc[6][s]://[nickname[:"
+"password]@]irc.example.org[:port][/#channel1][,#channel2[...]]\n"
" option: legt Option für den Server fest (die Boolean-Optionen können "
"weggelassen werden)\n"
" nooption: deaktiviert eine Boolean Option (Beispiel: -nossl)\n"
@@ -9210,9 +9212,10 @@ msgstr ""
msgid "maximum number of clients connecting to a port"
msgstr "maximale Anzahl an Clients die mit einem Port verbunden sein dürfen"
+#, fuzzy
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
"Passwort wird von Clients benötigt um Zugriff auf dieses Relay zu erhalten "
"(kein Eintrag bedeutet dass kein Passwort benötigt wird)"
diff --git a/po/es.po b/po/es.po
index 28df19a6b..5761f46cf 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-02 21:20+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2106,6 +2106,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -8626,9 +8627,10 @@ msgstr ""
msgid "maximum number of clients connecting to a port"
msgstr "número máximo de clientes conectados a un puerto"
+#, fuzzy
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
"los clientes requieren una clave para acceder este repetidor (sin valor "
"significa que no se requiere clave)"
diff --git a/po/fr.po b/po/fr.po
index acded4dac..6f8ee85cf 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 18:16+0200\n"
-"PO-Revision-Date: 2013-09-16 10:52+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
+"PO-Revision-Date: 2013-09-19 13:50+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -2173,6 +2173,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -2212,6 +2213,7 @@ msgstr ""
" - le paramètre de ligne de commande \"--run-command\"\n"
" - les options de serveur irc: autojoin, command, password, sasl_{username|"
"password}\n"
+" - l'option relay.network.password\n"
" - les options weechat.startup.command_{before|after}_plugins\n"
" - la commande /eval.\n"
"\n"
@@ -8978,10 +8980,11 @@ msgstr "nombre maximum de clients qui se connectent sur un port"
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
"mot de passe requis par les clients pour accéder à ce relai (une valeur vide "
-"indique que le mot de passe n'est pas nécessaire)"
+"indique que le mot de passe n'est pas nécessaire) (note: le contenu est "
+"évalué, voir /help eval)"
msgid ""
"file with SSL certificate and private key (for serving clients with SSL)"
diff --git a/po/hu.po b/po/hu.po
index 288beed29..a25c3266d 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-02 21:20+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1744,6 +1744,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -7791,7 +7792,7 @@ msgstr ""
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
msgid ""
diff --git a/po/it.po b/po/it.po
index 33e2e08b4..64b455556 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-02 21:20+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2148,6 +2148,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -8712,9 +8713,10 @@ msgstr ""
msgid "maximum number of clients connecting to a port"
msgstr "numero massimo di client connessi ad una porta"
+#, fuzzy
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
"password richiesta dai client per accedere a questo relay (un valore nullo "
"corrisponde a nessuna password richiesta)"
diff --git a/po/ja.po b/po/ja.po
index c27f12178..e43e2fab9 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-02 21:20+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@@ -2098,6 +2098,7 @@ msgstr ""
"passphrase <passphrase>|-delete || decrypt <passphrase>|-discard || set "
"<name> <value> || del <name>"
+#, fuzzy
msgid ""
"passphrase: change the passphrase (without passphrase, data is stored as "
"plain text in file sec.conf)\n"
@@ -2119,6 +2120,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -8640,9 +8642,10 @@ msgstr ""
msgid "maximum number of clients connecting to a port"
msgstr "ポートに接続するクライアントの最大数"
+#, fuzzy
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
"このリレーを利用するためにクライアントが必要なパスワード (空の場合パスワード"
"なし)"
diff --git a/po/pl.po b/po/pl.po
index 922324e8e..560c64a29 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-02 21:21+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -29,7 +29,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
"X-Generator: Poedit 1.5.5\n"
#. TRANSLATORS: "%s %s" after "compiled on" is date and time
@@ -2145,6 +2146,7 @@ msgstr ""
"passphrase <hasło>|-delete || decrypt <hasło>|-discard || set <nazwa> "
"<wartość> || del <nazwa>"
+#, fuzzy
msgid ""
"passphrase: change the passphrase (without passphrase, data is stored as "
"plain text in file sec.conf)\n"
@@ -2166,6 +2168,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -8811,9 +8814,10 @@ msgstr ""
msgid "maximum number of clients connecting to a port"
msgstr "maksymalna ilość klientów łączących się na port"
+#, fuzzy
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
"hasło wymagane od klientów do połączenia z tym pośrednikiem (pusta wartość "
"oznacza brak wymaganego hasła)"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 73ec39168..6c434f89e 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-16 11:21+0200\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2056,6 +2056,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -7990,9 +7991,10 @@ msgstr ""
msgid "maximum number of clients connecting to a port"
msgstr "número máximo de clientes conectando-se a uma porta"
+#, fuzzy
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
"senha necessária para clientes acessarem este relay (vazio significa que "
"nenhuma senha é necessária)"
diff --git a/po/ru.po b/po/ru.po
index f06226891..f8542c2fd 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-02 21:21+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -29,7 +29,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Poedit-Bookmarks: -1,-1,608,-1,-1,-1,-1,-1,-1,-1\n"
#. TRANSLATORS: "%s %s" after "compiled on" is date and time
@@ -1765,6 +1766,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -7818,7 +7820,7 @@ msgstr ""
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
msgid ""
diff --git a/po/tr.po b/po/tr.po
index bc8f8caf8..56fbc42fd 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-rc1\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-09-02 21:21+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1571,6 +1571,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -6948,7 +6949,7 @@ msgstr ""
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
msgid ""
diff --git a/po/weechat.pot b/po/weechat.pot
index 085f44703..4e9426532 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.1-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2013-09-01 15:56+0200\n"
+"POT-Creation-Date: 2013-09-19 13:49+0200\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1575,6 +1575,7 @@ msgid ""
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, sasl_{username|"
"password}\n"
+" - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n"
"\n"
@@ -6912,7 +6913,7 @@ msgstr ""
msgid ""
"password required by clients to access this relay (empty value means no "
-"password required)"
+"password required) (note: content is evaluated, see /help eval)"
msgstr ""
msgid ""
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index ac272aa11..49b95f5de 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -6903,6 +6903,7 @@ command_init ()
" - command line argument \"--run-command\"\n"
" - irc server options: autojoin, command, password, "
"sasl_{username|password}\n"
+ " - option relay.network.password\n"
" - options weechat.startup.command_{before|after}_plugins\n"
" - command /eval.\n\n"
"Examples:\n"
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c
index 3e52535d0..1c3feae2c 100644
--- a/src/plugins/relay/irc/relay-irc.c
+++ b/src/plugins/relay/irc/relay-irc.c
@@ -1296,7 +1296,7 @@ void
relay_irc_recv (struct t_relay_client *client, const char *data)
{
char str_time[128], str_signal[128], str_server_channel[256];
- char str_command[128], *target, **irc_argv, *pos;
+ char str_command[128], *target, **irc_argv, *pos, *password;
const char *irc_command, *irc_channel, *irc_args, *irc_args2;
int irc_argc, redirect_msg;
const char *nick, *irc_is_channel, *isupport, *info, *pos_password;
@@ -1366,11 +1366,16 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
pos_password = pos + 1;
}
}
- if (!RELAY_IRC_DATA(client, password_ok)
- && (strcmp (weechat_config_string (relay_config_network_password),
- pos_password) == 0))
+ if (!RELAY_IRC_DATA(client, password_ok))
{
- RELAY_IRC_DATA(client, password_ok) = 1;
+ password = weechat_string_eval_expression (weechat_config_string (relay_config_network_password),
+ NULL, NULL, NULL);
+ if (password)
+ {
+ if (strcmp (password, pos_password) == 0)
+ RELAY_IRC_DATA(client, password_ok) = 1;
+ free (password);
+ }
}
}
}
@@ -1773,9 +1778,10 @@ void
relay_irc_alloc (struct t_relay_client *client)
{
struct t_relay_irc_data *irc_data;
- const char *password;
+ char *password;
- password = weechat_config_string (relay_config_network_password);
+ password = weechat_string_eval_expression (weechat_config_string (relay_config_network_password),
+ NULL, NULL, NULL);
client->protocol_data = malloc (sizeof (*irc_data));
if (client->protocol_data)
@@ -1792,6 +1798,9 @@ relay_irc_alloc (struct t_relay_client *client)
RELAY_IRC_DATA(client, hook_signal_irc_disc) = NULL;
RELAY_IRC_DATA(client, hook_hsignal_irc_redir) = NULL;
}
+
+ if (password)
+ free (password);
}
/*
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c
index caccadf70..11e1b4b06 100644
--- a/src/plugins/relay/relay-config.c
+++ b/src/plugins/relay/relay-config.c
@@ -629,7 +629,8 @@ relay_config_init ()
relay_config_file, ptr_section,
"password", "string",
N_("password required by clients to access this relay (empty value "
- "means no password required)"),
+ "means no password required) (note: content is evaluated, see "
+ "/help eval)"),
NULL, 0, 0, "", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
relay_config_network_ssl_cert_key = weechat_config_new_option (
relay_config_file, ptr_section,
diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c
index 40620e2fd..55d0f9685 100644
--- a/src/plugins/relay/weechat/relay-weechat-protocol.c
+++ b/src/plugins/relay/weechat/relay-weechat-protocol.c
@@ -165,7 +165,7 @@ relay_weechat_protocol_is_sync (struct t_relay_client *ptr_client,
RELAY_WEECHAT_PROTOCOL_CALLBACK(init)
{
- char **options, *pos;
+ char **options, *pos, *password;
int num_options, i, compression;
RELAY_WEECHAT_PROTOCOL_MIN_ARGS(1);
@@ -182,10 +182,13 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(init)
pos++;
if (strcmp (options[i], "password") == 0)
{
- if (strcmp (weechat_config_string (relay_config_network_password),
- pos) == 0)
+ password = weechat_string_eval_expression (weechat_config_string (relay_config_network_password),
+ NULL, NULL, NULL);
+ if (password)
{
- RELAY_WEECHAT_DATA(client, password_ok) = 1;
+ if (strcmp (password, pos) == 0)
+ RELAY_WEECHAT_DATA(client, password_ok) = 1;
+ free (password);
}
}
else if (strcmp (options[i], "compression") == 0)
diff --git a/src/plugins/relay/weechat/relay-weechat.c b/src/plugins/relay/weechat/relay-weechat.c
index 4dba31192..748769759 100644
--- a/src/plugins/relay/weechat/relay-weechat.c
+++ b/src/plugins/relay/weechat/relay-weechat.c
@@ -167,9 +167,10 @@ void
relay_weechat_alloc (struct t_relay_client *client)
{
struct t_relay_weechat_data *weechat_data;
- const char *password;
+ char *password;
- password = weechat_config_string (relay_config_network_password);
+ password = weechat_string_eval_expression (weechat_config_string (relay_config_network_password),
+ NULL, NULL, NULL);
client->protocol_data = malloc (sizeof (*weechat_data));
if (client->protocol_data)
@@ -198,6 +199,9 @@ relay_weechat_alloc (struct t_relay_client *client)
relay_weechat_hook_signals (client);
}
+
+ if (password)
+ free (password);
}
/*