diff --git a/ChangeLog.adoc b/ChangeLog.adoc index e7571c657..3d57e5d21 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -27,6 +27,7 @@ New features:: * core: add support of modifiers in evaluation of expressions with "modifier:name,data,string" * api: add modifier "color_encode_ansi" (issue #528) * api: add modifier "eval_path_home" + * irc: add option irc.look.display_pv_warning_address to display a warning in private buffer if the remote nick address has changed (issue #892) * irc: add server option "ssl_password" (issue #115, issue #1416) * irc: add "user" in output of irc_message_parse (issue #136) * irc: add options irc.color.message_kick and irc.color.reason_kick (issue #683, issue #684) diff --git a/ReleaseNotes.adoc b/ReleaseNotes.adoc index c4f3a9c2c..ba7b19b52 100644 --- a/ReleaseNotes.adoc +++ b/ReleaseNotes.adoc @@ -75,6 +75,20 @@ This new server option has three possible values: _irc.network.channel_encode_ to _off_ (so this was the default behavior in previous versions) +[[v2.7_irc_pv_warning_address]] +=== Warning when nick address changes in private buffer + +A new option _irc.look.display_pv_warning_address_ has been added to display +a warning in a private buffer if the address of remote nick has changed. + +The warning is enabled by default and can be disabled with this command: + +---- +/set irc.look.display_pv_warning_address off +---- + +See issue #892 for more information. + [[v2.7_xfer_file_receive_suffix]] === Suffix for files received via DCC diff --git a/doc/de/autogen/user/irc_options.adoc b/doc/de/autogen/user/irc_options.adoc index d85ce32e8..071b8121b 100644 --- a/doc/de/autogen/user/irc_options.adoc +++ b/doc/de/autogen/user/irc_options.adoc @@ -224,6 +224,12 @@ ** Werte: on, off ** Standardwert: `+on+` +* [[option_irc.look.display_pv_warning_address]] *irc.look.display_pv_warning_address* +** Beschreibung: pass:none[display a warning in private buffer if the address of remote nick has changed] +** Typ: boolesch +** Werte: on, off +** Standardwert: `+on+` + * [[option_irc.look.highlight_channel]] *irc.look.highlight_channel* ** Beschreibung: pass:none[durch Kommata getrennte Liste von Wörtern die in Channel-Buffern als Highlight erscheinen sollen (zwischen Groß- und Kleinschreibung wird nicht unterschieden. Um zwischen Groß- und Kleinschreibung zu unterscheiden muss zu Beginn "(?-i)" genutzt werden; des Weiteren können folgende Variablen genutzt werden: $nick, $channel und $server). Wird ein Buffer geöffnet, dann werden die angegeben Wörter dem Buffer-Merkmal "highlight_words" hinzugefügt. Dies bedeutet, dass diese Einstellung keinen direkten Einfluss auf schon geöffnete Buffer hat. Eine leere Zeichenkette deaktiviert ein Highlight für den Nick. Beispiel: "$nick", "(?-i)$nick"] ** Typ: Zeichenkette diff --git a/doc/en/autogen/user/irc_options.adoc b/doc/en/autogen/user/irc_options.adoc index 38b805655..204759bb9 100644 --- a/doc/en/autogen/user/irc_options.adoc +++ b/doc/en/autogen/user/irc_options.adoc @@ -224,6 +224,12 @@ ** values: on, off ** default value: `+on+` +* [[option_irc.look.display_pv_warning_address]] *irc.look.display_pv_warning_address* +** description: pass:none[display a warning in private buffer if the address of remote nick has changed] +** type: boolean +** values: on, off +** default value: `+on+` + * [[option_irc.look.highlight_channel]] *irc.look.highlight_channel* ** description: pass:none[comma separated list of words to highlight in channel buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer property "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"] ** type: string diff --git a/doc/fr/autogen/user/irc_options.adoc b/doc/fr/autogen/user/irc_options.adoc index 774745082..8e6c51aff 100644 --- a/doc/fr/autogen/user/irc_options.adoc +++ b/doc/fr/autogen/user/irc_options.adoc @@ -224,6 +224,12 @@ ** valeurs: on, off ** valeur par défaut: `+on+` +* [[option_irc.look.display_pv_warning_address]] *irc.look.display_pv_warning_address* +** description: pass:none[afficher un avertissement dans le tampon privé si l'adresse du pseudo distant a changé] +** type: booléen +** valeurs: on, off +** valeur par défaut: `+on+` + * [[option_irc.look.highlight_channel]] *irc.look.highlight_channel* ** description: pass:none[liste de mots pour le highlight dans les tampons de type "canal", séparés par des virgules (insensible à la casse, utilisez "(?-i)" au début des mots pour les rendre sensibles à la casse ; les variables spéciales $nick, $channel et $server sont remplacées par leurs valeurs), ces mots sont ajoutés à la propriété du tampon "highlight_words" seulement lorsque le tampon est créé (cela n'affecte pas les tampons courants), une chaîne vide désactive le highlight par défaut sur le pseudo, exemples : "$nick", "(?-i)$nick"] ** type: chaîne diff --git a/doc/it/autogen/user/irc_options.adoc b/doc/it/autogen/user/irc_options.adoc index 26600c1c2..30f28a9a6 100644 --- a/doc/it/autogen/user/irc_options.adoc +++ b/doc/it/autogen/user/irc_options.adoc @@ -224,6 +224,12 @@ ** valori: on, off ** valore predefinito: `+on+` +* [[option_irc.look.display_pv_warning_address]] *irc.look.display_pv_warning_address* +** descrizione: pass:none[display a warning in private buffer if the address of remote nick has changed] +** tipo: bool +** valori: on, off +** valore predefinito: `+on+` + * [[option_irc.look.highlight_channel]] *irc.look.highlight_channel* ** descrizione: pass:none[comma separated list of words to highlight in channel buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer property "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"] ** tipo: stringa diff --git a/doc/ja/autogen/user/irc_options.adoc b/doc/ja/autogen/user/irc_options.adoc index 3f30f875f..db0157a0a 100644 --- a/doc/ja/autogen/user/irc_options.adoc +++ b/doc/ja/autogen/user/irc_options.adoc @@ -224,6 +224,12 @@ ** 値: on, off ** デフォルト値: `+on+` +* [[option_irc.look.display_pv_warning_address]] *irc.look.display_pv_warning_address* +** 説明: pass:none[display a warning in private buffer if the address of remote nick has changed] +** タイプ: ブール +** 値: on, off +** デフォルト値: `+on+` + * [[option_irc.look.highlight_channel]] *irc.look.highlight_channel* ** 説明: pass:none[現在のバッファでハイライトする単語のコンマ区切りリスト (大文字小文字を区別しない、"(?-i)" を単語の最初につければ大文字小文字を区別する; 特殊変数 $nick、$channel、$server はそれぞれの値に置換される)、これらの単語は、バッファの作成時にバッファプロパティ "highlight_words" に追加される (既存のバッファには影響なし)、空文字列はニックネームに関するデフォルトのハイライトを無効にする、例: "$nick", "(?-i)$nick"] ** タイプ: 文字列 diff --git a/doc/pl/autogen/user/irc_options.adoc b/doc/pl/autogen/user/irc_options.adoc index 018b41173..f510aecd7 100644 --- a/doc/pl/autogen/user/irc_options.adoc +++ b/doc/pl/autogen/user/irc_options.adoc @@ -224,6 +224,12 @@ ** wartości: on, off ** domyślna wartość: `+on+` +* [[option_irc.look.display_pv_warning_address]] *irc.look.display_pv_warning_address* +** opis: pass:none[display a warning in private buffer if the address of remote nick has changed] +** typ: bool +** wartości: on, off +** domyślna wartość: `+on+` + * [[option_irc.look.highlight_channel]] *irc.look.highlight_channel* ** opis: pass:none[oddzielona przecinkami lista słów do podświetleń w buforach kanałów (wielkość liter nie ma znaczenia, użyj "(?-i)" na początku słów, dla których wielkość liter ma znaczenie; zmienne specjalne $nick, $channel i $server są zastępowane odpowiednimi wartościami), słowa te są dodawane do zmiennej lokalnej bufora "highlight_words" tylko kiedy bufor jest tworzony (nie ma wpływu na obecne bufory), pusty ciąg wyłącza domyślne podświetlenia nicka, przykłady: "$nick", "(?-i)$nick"] ** typ: ciąg diff --git a/po/cs.po b/po/cs.po index 6788d2a7a..d3b080517 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-05-13 21:31+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -6139,6 +6139,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s%s: nemohu přidělit nový kanál" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s%s %s(%s%s%s)%s se zpet na serveru" @@ -8294,6 +8298,10 @@ msgstr "" "zobrazit v soukromém okně zprávu po tom co se uživatel vráti (po odpojení od " "serveru)" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/de.po b/po/de.po index 1e9f99c4f..b010eb2d0 100644 --- a/po/de.po +++ b/po/de.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-10-06 15:51+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -7584,6 +7584,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s%s: Neuer Channel konnte nicht alloziert werden" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s%s %s(%s%s%s)%s hat sich wieder am Server angemeldet" @@ -9952,6 +9956,10 @@ msgstr "" "es wird bei einer privaten Unterhaltung eine Mitteilung ausgegeben falls der " "User wieder zurück ist (falls der User sich beim Server abgemeldet hat)" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/es.po b/po/es.po index 8d6075c20..8e09502f4 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-05-13 21:31+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -6354,6 +6354,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s%s: no se pudo crear un nuevo canal" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s%s %s(%s%s%s)%s ha regresado al servidor" @@ -8552,6 +8556,10 @@ msgstr "" "mostrar un mensaje en privado cuando el usuario esta de vuelta (después de " "salir del servidor)" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + #, fuzzy msgid "" "comma separated list of words to highlight in channel buffers (case " diff --git a/po/fr.po b/po/fr.po index 1bc66bef3..f6a9e9d80 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: 2019-10-09 21:37+0200\n" -"PO-Revision-Date: 2019-10-09 21:39+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" +"PO-Revision-Date: 2019-10-11 20:23+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -7423,6 +7423,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s%s : impossible d'allouer un nouveau canal" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "%sAttention : l'adresse du pseudo distant a changé" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s%s %s(%s%s%s)%s est de retour sur le serveur" @@ -9736,6 +9740,12 @@ msgstr "" "afficher un message en privé lorsque l'utilisateur est de retour (après " "avoir quitté le serveur)" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" +"afficher un avertissement dans le tampon privé si l'adresse du pseudo " +"distant a changé" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/hu.po b/po/hu.po index 2fe18e91a..7137f5b0d 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-05-13 21:31+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -5665,6 +5665,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s nem sikerült új csatornát lefoglalni" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, fuzzy, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s %s(%s%s%s)%s belépett a(z) %s%s szobába\n" @@ -7722,6 +7726,10 @@ msgstr "privát beszélgetésben a másik fél távollétét csak egyszer jelezz msgid "display a message in private when user is back (after quit on server)" msgstr "" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/it.po b/po/it.po index 1edaaca41..aa3eb1443 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-05-13 21:31+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -6521,6 +6521,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s%s: impossibile allocare un nuovo canale" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s%s %s(%s%s%s)%s è tornato sul server" @@ -8734,6 +8738,10 @@ msgstr "" "mostra un messaggio in privato quando l'utente è tornato (dopo l'uscita dal " "server)" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + #, fuzzy msgid "" "comma separated list of words to highlight in channel buffers (case " diff --git a/po/ja.po b/po/ja.po index e51364b46..fefe59840 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-09-22 18:54+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: Polish \n" @@ -7234,6 +7234,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s%s: nie można przydzielić nowego kanału" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s%s %s(%s%s%s)%s jest z powrotem na serwerze" @@ -9509,6 +9513,10 @@ msgstr "" msgid "display a message in private when user is back (after quit on server)" msgstr "pokaż prywatną wiadomość, kiedy użytkownik wróci na serwer" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/pt.po b/po/pt.po index e1a643e89..ec51ac0c9 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-09-22 18:54+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -6891,6 +6891,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s%s: não é possível alocar novo canal" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s%s %s(%s%s%s)%s voltou ao servidor" @@ -9161,6 +9165,10 @@ msgstr "" "mostrar um mensagem em privado quando o utilizador voltar (depois de sair do " "servidor)" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/pt_BR.po b/po/pt_BR.po index 406981294..3bc836e98 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-05-13 21:32+0200\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -6312,6 +6312,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "" @@ -8154,6 +8158,10 @@ msgstr "" msgid "display a message in private when user is back (after quit on server)" msgstr "" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/ru.po b/po/ru.po index a3d91ae85..888543c12 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-05-13 21:32+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -5703,6 +5703,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "%s не могу расположить новый канал" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, fuzzy, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "%s%s %s(%s%s%s)%s зашёл на канал %s%s\n" @@ -7753,6 +7757,10 @@ msgstr "отображать уведомление об отсутствии е msgid "display a message in private when user is back (after quit on server)" msgstr "" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/tr.po b/po/tr.po index a565f1b3a..1e2a21cb4 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2019-05-13 21:32+0200\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -5230,6 +5230,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "" @@ -6996,6 +7000,10 @@ msgstr "" msgid "display a message in private when user is back (after quit on server)" msgstr "" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/po/weechat.pot b/po/weechat.pot index acb67b150..d86fbc926 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: 2019-10-09 21:37+0200\n" +"POT-Creation-Date: 2019-10-11 13:59+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -5171,6 +5171,10 @@ msgstr "" msgid "%s%s: cannot allocate new channel" msgstr "" +#, c-format +msgid "%sWarning: the address of remote nick has changed" +msgstr "" + #, c-format msgid "%s%s%s %s(%s%s%s)%s is back on server" msgstr "" @@ -6864,6 +6868,10 @@ msgstr "" msgid "display a message in private when user is back (after quit on server)" msgstr "" +msgid "" +"display a warning in private buffer if the address of remote nick has changed" +msgstr "" + msgid "" "comma separated list of words to highlight in channel buffers (case " "insensitive, use \"(?-i)\" at beginning of words to make them case " diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index deee971b5..a67358cbe 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -569,11 +569,57 @@ irc_channel_set_buffer_title (struct t_irc_channel *channel) void irc_channel_set_topic (struct t_irc_channel *channel, const char *topic) { + int display_warning; + + /* + * display a warning in the private buffer if the address of remote + * nick has changed (that means you may talk to someone else!) + */ + display_warning = ( + (channel->type == IRC_CHANNEL_TYPE_PRIVATE) + && weechat_config_boolean (irc_config_look_display_pv_warning_address) + && channel->topic && channel->topic[0] + && topic && topic[0] + && (strcmp (channel->topic, topic) != 0)); + if (channel->topic) free (channel->topic); channel->topic = (topic) ? strdup (topic) : NULL; irc_channel_set_buffer_title (channel); + + if (display_warning) + { + weechat_printf_date_tags ( + channel->buffer, + 0, + "no_log,warning_nick_address", + _("%sWarning: the address of remote nick has changed"), + weechat_prefix ("error")); + } +} + +/* + * Sets topic of all private buffers with a nick. + */ + +void +irc_channel_set_topic_private_buffers (struct t_irc_server *server, + struct t_irc_nick *nick, + const char *nickname, + const char *topic) +{ + struct t_irc_channel *ptr_channel; + + for (ptr_channel = server->channels; ptr_channel; + ptr_channel = ptr_channel->next_channel) + { + if ((ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE) + && (irc_server_strcasecmp (server, ptr_channel->name, (nick) ? nick->name : nickname) == 0)) + { + irc_channel_set_topic (ptr_channel, topic); + } + } } /* diff --git a/src/plugins/irc/irc-channel.h b/src/plugins/irc/irc-channel.h index 0e75ccbed..78dea65cd 100644 --- a/src/plugins/irc/irc-channel.h +++ b/src/plugins/irc/irc-channel.h @@ -103,6 +103,10 @@ extern void irc_channel_add_nicklist_groups (struct t_irc_server *server, extern void irc_channel_set_buffer_title (struct t_irc_channel *channel); extern void irc_channel_set_topic (struct t_irc_channel *channel, const char *topic); +extern void irc_channel_set_topic_private_buffers (struct t_irc_server *server, + struct t_irc_nick *nick, + const char *nickname, + const char *topic); extern void irc_channel_set_modes (struct t_irc_channel *channel, const char *modes); extern void irc_channel_free (struct t_irc_server *server, diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 6943f0a5e..dd18a268c 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -70,6 +70,7 @@ struct t_config_option *irc_config_look_display_join_message; struct t_config_option *irc_config_look_display_old_topic; struct t_config_option *irc_config_look_display_pv_away_once; struct t_config_option *irc_config_look_display_pv_back; +struct t_config_option *irc_config_look_display_pv_warning_address; struct t_config_option *irc_config_look_highlight_channel; struct t_config_option *irc_config_look_highlight_pv; struct t_config_option *irc_config_look_highlight_server; @@ -2825,6 +2826,13 @@ irc_config_init () "server)"), NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + irc_config_look_display_pv_warning_address = weechat_config_new_option ( + irc_config_file, ptr_section, + "display_pv_warning_address", "boolean", + N_("display a warning in private buffer if the address of remote nick " + "has changed"), + NULL, 0, 0, "on", NULL, 0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); irc_config_look_highlight_channel = weechat_config_new_option ( irc_config_file, ptr_section, "highlight_channel", "string", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index ad2099aaf..d8712e362 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -110,6 +110,7 @@ extern struct t_config_option *irc_config_look_display_join_message; extern struct t_config_option *irc_config_look_display_old_topic; extern struct t_config_option *irc_config_look_display_pv_away_once; extern struct t_config_option *irc_config_look_display_pv_back; +extern struct t_config_option *irc_config_look_display_pv_warning_address; extern struct t_config_option *irc_config_look_highlight_channel; extern struct t_config_option *irc_config_look_highlight_pv; extern struct t_config_option *irc_config_look_highlight_server; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index a5566c4cc..cf741c873 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -1244,7 +1244,11 @@ IRC_PROTOCOL_CALLBACK(join) /* display message in private if private has flag "has_quit_server" */ if (!local_join) + { irc_channel_display_nick_back_in_pv (server, ptr_nick, nick); + irc_channel_set_topic_private_buffers (server, ptr_nick, nick, + address); + } } if (local_join) @@ -1717,7 +1721,11 @@ IRC_PROTOCOL_CALLBACK(nick) } if (!local_nick) + { irc_channel_display_nick_back_in_pv (server, ptr_nick_found, new_nick); + irc_channel_set_topic_private_buffers (server, ptr_nick_found, + new_nick, address); + } return WEECHAT_RC_OK; }