diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-12-10 21:13:00 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-12-10 21:13:00 +0100 |
commit | b3422b96c00e57a71afe7ba293a9648b219ab85e (patch) | |
tree | c053bf012b9effbfd17f52e36120e2f3abd66657 | |
parent | 3db8eb65ff4092eaedd25d2089302d358687a81e (diff) | |
download | weechat-b3422b96c00e57a71afe7ba293a9648b219ab85e.zip |
irc: add option irc.look.display_host_wallops
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | po/cs.po | 7 | ||||
-rw-r--r-- | po/de.po | 15 | ||||
-rw-r--r-- | po/es.po | 7 | ||||
-rw-r--r-- | po/fr.po | 7 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/it.po | 7 | ||||
-rw-r--r-- | po/ja.po | 7 | ||||
-rw-r--r-- | po/pl.po | 7 | ||||
-rw-r--r-- | po/pt.po | 7 | ||||
-rw-r--r-- | po/pt_BR.po | 7 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/sr.po | 7 | ||||
-rw-r--r-- | po/tr.po | 7 | ||||
-rw-r--r-- | po/weechat.pot | 5 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.c | 7 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.h | 1 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 9 | ||||
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 7 |
19 files changed, 105 insertions, 22 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 4190eeedd..cdd2e8ee8 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -28,6 +28,7 @@ New features:: * core, alias, trigger: allow wildcard in commands `/bar`, `/item`, `/proxy`, `/alias` and `/trigger` (issue #1956) * api: add info "mouse" * buflist: jump to previous/next buffer displayed in buflist item with ctrl+wheel up/down on a buflist item (issue #1473) + * irc: add option irc.look.display_host_wallops * irc: add server option "anti_flood" (now in milliseconds), remove server options "anti_flood_prio_{high|low}" (issue #1039) * irc: add option irc.look.list_buffer * irc: change default value of server option "tls_priorities" to `NORMAL` @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10360,6 +10360,11 @@ msgstr "zobrazovat hosta ve zprávách o připojení" msgid "display host in part/quit messages" msgstr "zobrazovat hosta ve zprávách o odchodu/ukončení" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "zobrazovat hosta ve zprávách o připojení" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-12-04 08:59+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -11470,6 +11470,11 @@ msgstr "zeigt den Host innerhalb einer notice Nachricht an" msgid "display host in part/quit messages" msgstr "zeigt den Host innerhalb einer part/quit Nachricht an" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "zeigt den Host innerhalb einer join Nachricht an" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -13926,7 +13931,6 @@ msgstr "1, falls Filter aktiviert sind" msgid "1 if cursor mode is enabled" msgstr "1, falls Cursor-Modus aktiviert ist" -#| msgid "Mouse is enabled" msgid "1 if mouse is enabled" msgstr "1, wenn Maus aktiviert ist" @@ -16424,8 +16428,7 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat" msgid "" "list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace " "<name> <hook> " -"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<" -"return_code>\" [\"<post_action>\"]]]]]] " +"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] " "|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> " "<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|" "<mask> [<name>|<mask>...]] || restart <name>|<mask> [<name>|<mask>...] || " @@ -16434,8 +16437,7 @@ msgid "" msgstr "" "list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace " "<name> <hook> " -"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<" -"return_code>\" [\"<post_action>\"]]]]]] " +"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] " "|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> " "<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|" "<mask> [<name>|<mask>...]] || restart <name>|<mask> [<name>|<mask>...] || " @@ -17433,4 +17435,3 @@ 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)" - @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10586,6 +10586,11 @@ msgstr "muestra el host en mensajes de unión" msgid "display host in part/quit messages" msgstr "muestra el host en mensajes de salida/abandono" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "muestra el host en mensajes de unión" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" -"PO-Revision-Date: 2023-12-02 09:43+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" +"PO-Revision-Date: 2023-12-10 21:11+0100\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -11249,6 +11249,9 @@ msgstr "afficher le nom d'hôte dans les messages notice" msgid "display host in part/quit messages" msgstr "afficher le nom d'hôte dans les messages part/quit" +msgid "display host in wallops messages" +msgstr "afficher le nom d'hôte dans les messages wallops" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9960,6 +9960,10 @@ msgstr "új üzenetet tartalmazó ablak színe" msgid "display host in part/quit messages" msgstr "alapértelmezett kilépő üzenet" +#, fuzzy +msgid "display host in wallops messages" +msgstr "új üzenetet tartalmazó ablak színe" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10586,6 +10586,11 @@ msgid "display host in part/quit messages" msgstr "visualizza host nei messaggi di uscita/abbandono" #, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "visualizza l'host nei messaggi di entrata" + +#, fuzzy msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -10928,6 +10928,11 @@ msgstr "参加メッセージにホスト名を表示" msgid "display host in part/quit messages" msgstr "退出/終了 メッセージにホスト名を表示" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "参加メッセージにホスト名を表示" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-12-04 21:07+0100\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -10924,6 +10924,11 @@ msgstr "wyświetlaj host w powiadomieniach" msgid "display host in part/quit messages" msgstr "pokazuj host w wiadomościach o opuszczeniu kanału/wyjściu z IRC" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "wyświetlaj host w wiadomościach o wejściu na kanał" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -10899,6 +10899,11 @@ msgstr "mostrar host nas mensagens de join" msgid "display host in part/quit messages" msgstr "mostrar host nas mensagens de part/quit" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "mostrar host nas mensagens de join" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " diff --git a/po/pt_BR.po b/po/pt_BR.po index 5eca596ae..327e96c4e 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: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-10-20 13:11+0200\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10265,6 +10265,11 @@ msgstr "exibir host em mensagens de entrada no canal" msgid "display host in part/quit messages" msgstr "" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "exibir host em mensagens de entrada no canal" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10000,6 +10000,10 @@ msgstr "цвет текущего окна с сообщениями" msgid "display host in part/quit messages" msgstr "сообщение о выходе по-умолчанию" +#, fuzzy +msgid "display host in wallops messages" +msgstr "цвет текущего окна с сообщениями" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-12-05 14:55+0400\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10903,6 +10903,11 @@ msgstr "приказ хоста у порукама обавештења" msgid "display host in part/quit messages" msgstr "приказ хоста у порукама напуштања/изласка" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "приказ хоста у порукама приступа" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11072,6 +11072,11 @@ msgstr "katılma iletilerinde makineyi görüntüle" msgid "display host in part/quit messages" msgstr "ayrılma/çıkma iletilerinde makineyi görüntüle" +#, fuzzy +#| msgid "display host in join messages" +msgid "display host in wallops messages" +msgstr "katılma iletilerinde makineyi görüntüle" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " diff --git a/po/weechat.pot b/po/weechat.pot index a239bb553..1f618d157 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: 2023-12-01 22:04+0100\n" +"POT-Creation-Date: 2023-12-10 21:05+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" @@ -9045,6 +9045,9 @@ msgstr "" msgid "display host in part/quit messages" msgstr "" +msgid "display host in wallops messages" +msgstr "" + msgid "" "comma-separated list of messages to display after joining a channel: 324 = " "channel modes, 329 = channel creation date, 332 = topic, 333 = nick/date for " diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 092856382..e023c7dc6 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -77,6 +77,7 @@ struct t_config_option *irc_config_look_display_host_join = NULL; struct t_config_option *irc_config_look_display_host_join_local = NULL; struct t_config_option *irc_config_look_display_host_notice = NULL; struct t_config_option *irc_config_look_display_host_quit = NULL; +struct t_config_option *irc_config_look_display_host_wallops = NULL; struct t_config_option *irc_config_look_display_join_message = NULL; struct t_config_option *irc_config_look_display_old_topic = NULL; struct t_config_option *irc_config_look_display_pv_away_once = NULL; @@ -3182,6 +3183,12 @@ irc_config_init () N_("display host in part/quit messages"), NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + irc_config_look_display_host_wallops = weechat_config_new_option ( + irc_config_file, irc_config_section_look, + "display_host_wallops", "boolean", + N_("display host in wallops messages"), + NULL, 0, 0, "on", NULL, 0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); irc_config_look_display_join_message = weechat_config_new_option ( irc_config_file, irc_config_section_look, "display_join_message", "string", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index 26f12bf65..05dca8580 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -112,6 +112,7 @@ extern struct t_config_option *irc_config_look_display_host_join; extern struct t_config_option *irc_config_look_display_host_join_local; extern struct t_config_option *irc_config_look_display_host_notice; extern struct t_config_option *irc_config_look_display_host_quit; +extern struct t_config_option *irc_config_look_display_host_wallops; 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; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 7e3381544..33056b59a 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3936,13 +3936,20 @@ IRC_PROTOCOL_CALLBACK(wallops) { const char *nick_address; char *str_message; + int display_host; IRC_PROTOCOL_MIN_PARAMS(1); if (ctxt->ignore_remove) return WEECHAT_RC_OK; - nick_address = irc_protocol_nick_address (ctxt->server, 0, NULL, ctxt->nick, ctxt->address); + display_host = weechat_config_boolean (irc_config_look_display_host_wallops); + nick_address = irc_protocol_nick_address ( + ctxt->server, + 0, + NULL, + ctxt->nick, + (display_host) ? ctxt->address : NULL); str_message = irc_protocol_string_params (ctxt->params, 0, ctxt->num_params - 1); diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index d08c75347..507af3851 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -3404,6 +3404,13 @@ TEST(IrcProtocolWithServer, wallops) RECV(":alice!user@host WALLOPS :message from admin "); CHECK_SRV("--", "Wallops from alice (user@host): message from admin ", "irc_wallops,notify_private,nick_alice,host_user@host,log3"); + + /* wallops with option irc.look.display_host_wallops set to off */ + config_file_option_set (irc_config_look_display_host_wallops, "off", 1); + RECV(":alice!user@host WALLOPS :message from admin "); + CHECK_SRV("--", "Wallops from alice: message from admin ", + "irc_wallops,notify_private,nick_alice,host_user@host,log3"); + config_file_option_reset (irc_config_look_display_host_wallops, 1); } /* |