diff --git a/ChangeLog b/ChangeLog index b5494797c..760b6c49a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,8 @@ Version 0.4.0 (under dev!) aspell.check.suggestions (task #12061) * aspell: fix creation of spellers when number of dictionaries is different between two buffers +* irc: read local variable "autorejoin" in buffer to override server option + "autorejoin" (task #12256) * irc: add option "-auto" for command /connect (task #9340) * irc: add support of "server-time" capability (task #12255) * irc: add support of tags in messages diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt index dc0909683..4b5cefd42 100644 --- a/doc/de/autogen/user/irc_options.txt +++ b/doc/de/autogen/user/irc_options.txt @@ -419,7 +419,7 @@ ** Werte: 1 .. 65535 (Standardwert: `10`) * [[option_irc.server_default.autorejoin]] *irc.server_default.autorejoin* -** Beschreibung: `Channels automatisch betreten, falls man rausgeworfen wurde` +** Beschreibung: `automatically rejoin channels after kick; you can define a buffer local variable on a channel to override this value (name of variable: "autorejoin", value: "on" or "off")` ** Typ: boolesch ** Werte: on, off (Standardwert: `off`) diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt index a1f745a3a..6462c0ae2 100644 --- a/doc/en/autogen/user/irc_options.txt +++ b/doc/en/autogen/user/irc_options.txt @@ -419,7 +419,7 @@ ** values: 1 .. 65535 (default value: `10`) * [[option_irc.server_default.autorejoin]] *irc.server_default.autorejoin* -** description: `automatically rejoin channels after kick` +** description: `automatically rejoin channels after kick; you can define a buffer local variable on a channel to override this value (name of variable: "autorejoin", value: "on" or "off")` ** type: boolean ** values: on, off (default value: `off`) diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt index f70160c9f..a3cddf431 100644 --- a/doc/fr/autogen/user/irc_options.txt +++ b/doc/fr/autogen/user/irc_options.txt @@ -419,7 +419,7 @@ ** valeurs: 1 .. 65535 (valeur par défaut: `10`) * [[option_irc.server_default.autorejoin]] *irc.server_default.autorejoin* -** description: `rejoindre automatiquement les canaux après un "kick"` +** description: `rejoindre automatiquement les canaux après un "kick"; vous pouvez définir une variable locale de tampon sur un canal pour remplacer cette valeur (nom de la variable: "autorejoin", valeur: "on" ou "off")` ** type: booléen ** valeurs: on, off (valeur par défaut: `off`) diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt index 416355149..952a3a74d 100644 --- a/doc/it/autogen/user/irc_options.txt +++ b/doc/it/autogen/user/irc_options.txt @@ -419,7 +419,7 @@ ** valori: 1 .. 65535 (valore predefinito: `10`) * [[option_irc.server_default.autorejoin]] *irc.server_default.autorejoin* -** descrizione: `rientra automaticamente nei canali dopo il kick` +** descrizione: `automatically rejoin channels after kick; you can define a buffer local variable on a channel to override this value (name of variable: "autorejoin", value: "on" or "off")` ** tipo: bool ** valori: on, off (valore predefinito: `off`) diff --git a/doc/ja/autogen/user/irc_options.txt b/doc/ja/autogen/user/irc_options.txt index d554db780..0b9262152 100644 --- a/doc/ja/autogen/user/irc_options.txt +++ b/doc/ja/autogen/user/irc_options.txt @@ -419,7 +419,7 @@ ** 値: 1 .. 65535 (デフォルト値: `10`) * [[option_irc.server_default.autorejoin]] *irc.server_default.autorejoin* -** 説明: `キックされた後に自動的に再度参加` +** 説明: `automatically rejoin channels after kick; you can define a buffer local variable on a channel to override this value (name of variable: "autorejoin", value: "on" or "off")` ** タイプ: ブール ** 値: on, off (デフォルト値: `off`) diff --git a/po/cs.po b/po/cs.po index 8a998cdbf..f76ab54b0 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -5696,8 +5696,11 @@ msgstr "" "čárkou rozdělený seznam kanálů na které přistoupit po připojení na server " "(příklad: \"#kanál1,#kanál2,#kanál3 klíč1,klíč2\")" -msgid "automatically rejoin channels after kick" -msgstr "automaticky znovu přijít na kanály po vykopnutí" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" msgid "delay (in seconds) before autorejoin (after kick)" msgstr "doba (v sekundách) před novým znovupřipojením (po vykopnutí)" @@ -9255,6 +9258,9 @@ msgstr "" msgid "Constants" msgstr "" +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "automaticky znovu přijít na kanály po vykopnutí" + #~ msgid "prefix for error messages" #~ msgstr "prefix pro chybové zprávy" diff --git a/po/de.po b/po/de.po index 6f21fef04..a1f8d37ed 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-11-04 15:41+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -6245,8 +6245,11 @@ msgstr "" "durch Kommata getrennte Liste der Channels, die beim Verbinden zum Server " "betreten werden sollen (Beispiel: \"#chan1,#chan2,#chan3 key1,key2\")" -msgid "automatically rejoin channels after kick" -msgstr "Channels automatisch betreten, falls man rausgeworfen wurde" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" msgid "delay (in seconds) before autorejoin (after kick)" msgstr "" @@ -10078,6 +10081,9 @@ msgstr "Type" msgid "Constants" msgstr "Konstanten" +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "Channels automatisch betreten, falls man rausgeworfen wurde" + #~ msgid "prefix for error messages" #~ msgstr "Präfix für Fehlermeldungen" diff --git a/po/es.po b/po/es.po index 50b266adc..062238f6d 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -5919,8 +5919,11 @@ msgstr "" "lista de canales (separados por comas) a unirse cuando se conecte a un " "servidor (ejemplo: \"#canal1,#canal2,#canal3 clave1,clave2\")" -msgid "automatically rejoin channels after kick" -msgstr "automáticamente unirse a los canales al ser expulsado" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" msgid "delay (in seconds) before autorejoin (after kick)" msgstr "" @@ -9539,6 +9542,9 @@ msgstr "Tipo" msgid "Constants" msgstr "Constantes" +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "automáticamente unirse a los canales al ser expulsado" + #~ msgid "prefix for error messages" #~ msgstr "prefijo para mensajes de error" diff --git a/po/fr.po b/po/fr.po index eaa3c4d8c..9d816c777 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" -"PO-Revision-Date: 2012-12-05 18:26+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" +"PO-Revision-Date: 2012-12-05 19:18+0100\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -6085,8 +6085,14 @@ msgstr "" "liste des canaux (séparés par des virgules) à rejoindre lorsque connecté au " "serveur (exemple: \"#chan1,#chan2,#chan3 key1,key2\")" -msgid "automatically rejoin channels after kick" -msgstr "rejoindre automatiquement les canaux après un \"kick\"" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" +"rejoindre automatiquement les canaux après un \"kick\"; vous pouvez définir " +"une variable locale de tampon sur un canal pour remplacer cette valeur (nom " +"de la variable: \"autorejoin\", valeur: \"on\" ou \"off\")" msgid "delay (in seconds) before autorejoin (after kick)" msgstr "" @@ -9828,6 +9834,9 @@ msgstr "Type" msgid "Constants" msgstr "Constantes" +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "rejoindre automatiquement les canaux après un \"kick\"" + #~ msgid "prefix for error messages" #~ msgstr "préfixe pour les messages d'erreur" diff --git a/po/hu.po b/po/hu.po index ef4ec6bf8..aa1d5fa43 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -5286,9 +5286,11 @@ msgstr "" "szobák vesszővel elválasztott listája ahová be akarunk lépni csatlakozás " "után (például: \"#szoba1,#szoba2,#szoba3 kulcs1,kulcs2\")" -#, fuzzy -msgid "automatically rejoin channels after kick" -msgstr "automatikus visszalépés a szobába kirúgáskor" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" #, fuzzy msgid "delay (in seconds) before autorejoin (after kick)" @@ -8740,6 +8742,10 @@ msgstr "" msgid "Constants" msgstr "" +#, fuzzy +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "automatikus visszalépés a szobába kirúgáskor" + #, fuzzy #~ msgid "prefix for error messages" #~ msgstr "hibakereső üzenetek megjelenítése" diff --git a/po/it.po b/po/it.po index 8e4a2fc65..2b8cb84ae 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -5907,8 +5907,11 @@ msgstr "" "elenco separato da virgole di canali in cui entrare quando si è connessi al " "server (esempio: \"#canale1\", #canale2, #canale3 chiave1,chiave2\")" -msgid "automatically rejoin channels after kick" -msgstr "rientra automaticamente nei canali dopo il kick" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" msgid "delay (in seconds) before autorejoin (after kick)" msgstr "ritardo (in secondi) prima di rientrare automaticamente (dopo il kick)" @@ -9525,6 +9528,9 @@ msgstr "Tipo" msgid "Constants" msgstr "Costanti" +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "rientra automaticamente nei canali dopo il kick" + #~ msgid "prefix for error messages" #~ msgstr "prefisso per i messaggi di errore" diff --git a/po/ja.po b/po/ja.po index 5222fd2a0..0aecbd392 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -5789,8 +5789,11 @@ msgstr "" "サーバに接続した際に参加するチャンネルのコンマ区切りリスト(例: \"#chan1," "#chan2,#chan3 key1,key2\")" -msgid "automatically rejoin channels after kick" -msgstr "キックされた後に自動的に再度参加" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" msgid "delay (in seconds) before autorejoin (after kick)" msgstr "自動再参加前の遅延時間 (秒単位) (キック後)" @@ -9392,6 +9395,9 @@ msgstr "タイプ" msgid "Constants" msgstr "定数" +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "キックされた後に自動的に再度参加" + #~ msgid "prefix for error messages" #~ msgstr "エラーメッセージのプレフィックス" diff --git a/po/pl.po b/po/pl.po index faf525eb3..d7b1c21b2 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -5887,8 +5887,11 @@ msgstr "" "oddzielona przecinkami lista kanałów do wejścia po połączeniu z serwerem " "(przykład: \"#kanał1,#kanał2,#kanał3 klucz1,klucz2\")" -msgid "automatically rejoin channels after kick" -msgstr "automatycznie wejdź na kanał po wykopaniu" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" msgid "delay (in seconds) before autorejoin (after kick)" msgstr "opóźnienie (w sekundach) przed wejściem na kanał (po wykopaniu)" @@ -9454,6 +9457,9 @@ msgstr "Typ" msgid "Constants" msgstr "Stałe" +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "automatycznie wejdź na kanał po wykopaniu" + #~ msgid "prefix for error messages" #~ msgstr "przedrostek informacji o błędzie" diff --git a/po/pt_BR.po b/po/pt_BR.po index b96cc773f..101303b58 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-09-29 11:43+0200\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -5441,8 +5441,11 @@ msgstr "" "lista de canais (separados por vírgula) para entrar quando conectar ao " "servidor (exemplo: \"#chan1,#chan2,#chan3 senha1,senha2\")" -msgid "automatically rejoin channels after kick" -msgstr "Re-entrar automaticamente em canais após ser chutado" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" msgid "delay (in seconds) before autorejoin (after kick)" msgstr "" @@ -8885,6 +8888,9 @@ msgstr "" msgid "Constants" msgstr "" +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "Re-entrar automaticamente em canais após ser chutado" + #~ msgid "prefix for error messages" #~ msgstr "prefixo para mensagens de erro" diff --git a/po/ru.po b/po/ru.po index abc4d80b4..e962aea4b 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: 2012-09-29 11:43+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -5305,9 +5305,11 @@ msgstr "" "разделённый запятыми список каналов, на которые заходить при подключении к " "серверу (например, \"#chan1,#chan2,#chan3 key1,key2\")" -#, fuzzy -msgid "automatically rejoin channels after kick" -msgstr "автоматически перезаходить на каналы после кика" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" +msgstr "" #, fuzzy msgid "delay (in seconds) before autorejoin (after kick)" @@ -8757,6 +8759,10 @@ msgstr "" msgid "Constants" msgstr "" +#, fuzzy +#~ msgid "automatically rejoin channels after kick" +#~ msgstr "автоматически перезаходить на каналы после кика" + #, fuzzy #~ msgid "prefix for error messages" #~ msgstr "выводить отладочные сообщения" diff --git a/po/weechat.pot b/po/weechat.pot index e2cfd1044..a3cb4d879 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"POT-Creation-Date: 2012-12-05 19:17+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -4572,7 +4572,10 @@ msgid "" "\"#chan1,#chan2,#chan3 key1,key2\")" msgstr "" -msgid "automatically rejoin channels after kick" +msgid "" +"automatically rejoin channels after kick; you can define a buffer local " +"variable on a channel to override this value (name of variable: \"autorejoin" +"\", value: \"on\" or \"off\")" msgstr "" msgid "delay (in seconds) before autorejoin (after kick)" diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 72d31f44f..8539a35c0 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -1631,7 +1631,10 @@ irc_config_server_new_option (struct t_config_file *config_file, new_option = weechat_config_new_option ( config_file, section, option_name, "boolean", - N_("automatically rejoin channels after kick"), + N_("automatically rejoin channels after kick; you can define " + "a buffer local variable on a channel to override this " + "value (name of variable: \"autorejoin\", value: \"on\" or " + "\"off\")"), NULL, 0, 0, default_value, value, null_value_allowed, diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index d5464d5d9..d726c4897 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -631,6 +631,8 @@ IRC_PROTOCOL_CALLBACK(join) IRC_PROTOCOL_CALLBACK(kick) { char *pos_comment; + const char *ptr_autorejoin; + int rejoin; struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick, *ptr_nick_kicked; @@ -696,7 +698,20 @@ IRC_PROTOCOL_CALLBACK(kick) * more */ irc_nick_free_all (server, ptr_channel); - if (IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AUTOREJOIN)) + + /* read option "autorejoin" in server */ + rejoin = IRC_SERVER_OPTION_BOOLEAN(server, IRC_SERVER_OPTION_AUTOREJOIN); + + /* + * if buffer has a local variable "autorejoin", use it + * (it has higher priority than server option + */ + ptr_autorejoin = weechat_buffer_get_string (ptr_channel->buffer, + "localvar_autorejoin"); + if (ptr_autorejoin) + rejoin = weechat_config_string_to_boolean (ptr_autorejoin); + + if (rejoin) { if (IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AUTOREJOIN_DELAY) == 0) {