1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

irc: add option irc.look.open_pv_buffer_echo_msg (issue #2016)

This commit is contained in:
Sébastien Helleu
2023-09-14 20:22:43 +02:00
parent 49bbc53d7c
commit 7f13bdb51a
19 changed files with 101 additions and 17 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ New features::
Bug fixes::
* irc: don't open a new private buffer on `/msg` command when capability echo-message is enabled (issue #2016)
irc: add option irc.look.open_pv_buffer_echo_msg to open private buffer on self message when capability echo-message is enabled (issue #2016)
* irc: fix title of private buffers wrongly set to own address when capability echo-message is enabled (issue #2016)
* irc: fix autojoin of channels when private buffers are opened (issue #2012)
* irc: fix string comparison when CASEMAPPING is set to "ascii"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-25 00:48+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9223,6 +9223,10 @@ msgstr ""
"když se změní status nepřítomnosti přezdívky (výsledek příkazu whois), "
"například: \"notify_highlight\", \"notify_message\" or \"notify_private\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "zavřít buffer, když je na kanálu spuštěn /part"
+5 -1
View File
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -11460,6 +11460,10 @@ msgstr ""
"(Rückgabe durch Befehl whois), zum Beispiel: \"notify_message\", "
"\"notify_private\" oder \"notify_highlight\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "schließt den Buffer wenn \"/part\" im Kanal ausgeführt wird"
+5 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9922,6 +9922,10 @@ msgstr ""
"cuando un apodo cambia su estado de ausencia (resultado del comando whois), "
"por ejemplo: \"notify_highlight\", \"notify_message\" o \"notify_private\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "cerrar el buffer cuando /part es usado en un canal"
+8 -2
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"PO-Revision-Date: 2023-09-12 15:11+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-09-14 20:21+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -11242,6 +11242,12 @@ msgstr ""
"de la commande whois), par exemple : \"notify_message\", \"notify_private\" "
"ou \"notify_highlight\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
"ouvrir un tampon privé sur son propre message quand la capacité echo-message "
"est activée"
msgid "close buffer when /part is issued on a channel"
msgstr "fermer le tampon lorsque /part est exécuté sur un canal"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8680,6 +8680,10 @@ msgid ""
"\"notify_message\", \"notify_private\" or \"notify_highlight\""
msgstr ""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr ""
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9647,6 +9647,10 @@ msgstr ""
"whois), ad esempio: \"notify_message\", \"notify_private\" o "
"\"notify_highlight\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "chiude buffer quando viene digitato /part nel canale"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -10827,6 +10827,10 @@ msgstr ""
"よって表示されたメッセージに使われたタグのコンマ区切りリスト、例: "
"\"notify_message\"、\"notify_private\"、\"notify_highlight\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "/part を実行した場合にバッファを閉じる"
+5 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -11823,6 +11823,10 @@ msgstr ""
"komendy whois), na przykład: \"notify_message\", \"notify_private\" or "
"\"notify_highlight\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "zamyka bufor, kiedy na kanale wykonamy /part"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -10594,6 +10594,10 @@ msgstr ""
"whois), por exemplo: \"notify_message\", \"notify_private\" ou "
"\"notify_highlight\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "fechar o buffer ao executar /part num canal"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9225,6 +9225,10 @@ msgid ""
"\"notify_message\", \"notify_private\" or \"notify_highlight\""
msgstr ""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "fechar buffer quando o comando /part é executado em um canal"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8712,6 +8712,10 @@ msgid ""
"\"notify_message\", \"notify_private\" or \"notify_highlight\""
msgstr ""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr ""
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11028,6 +11028,10 @@ msgstr ""
"се статус одсуства надимка промени (резултат команде whois), на пример: "
"„notify_message”, „notify_private” или „notify_highlight”"
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "затварање бафера када се на каналу изврши /part"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11393,6 +11393,10 @@ msgstr ""
"kullanılan etiketlerin virgülle ayrılmış listesi (komut whois'inin sonucu); "
"örneğin: \"notify_message\", \"notify_private\" veya \"notify_highlight\""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr "bir kanalda /part verildiğinde arabelleği kapat"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-09-12 15:10+0200\n"
"POT-Creation-Date: 2023-09-14 20:21+0200\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"
@@ -7789,6 +7789,10 @@ msgid ""
"\"notify_message\", \"notify_private\" or \"notify_highlight\""
msgstr ""
msgid ""
"open a private buffer on self message when capability echo-message is enabled"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr ""
+8
View File
@@ -103,6 +103,7 @@ struct t_config_option *irc_config_look_notice_welcome_redirect = NULL;
struct t_config_option *irc_config_look_notice_welcome_tags = NULL;
struct t_config_option *irc_config_look_notify_tags_ison = NULL;
struct t_config_option *irc_config_look_notify_tags_whois = NULL;
struct t_config_option *irc_config_look_open_pv_buffer_echo_msg = NULL;
struct t_config_option *irc_config_look_part_closes_buffer = NULL;
struct t_config_option *irc_config_look_pv_buffer = NULL;
struct t_config_option *irc_config_look_pv_tags = NULL;
@@ -3266,6 +3267,13 @@ irc_config_init ()
"\"notify_highlight\""),
NULL, 0, 0, "notify_message", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_open_pv_buffer_echo_msg = weechat_config_new_option (
irc_config_file, irc_config_section_look,
"open_pv_buffer_echo_msg", "boolean",
N_("open a private buffer on self message when capability "
"echo-message is enabled"),
NULL, 0, 0, "on", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_part_closes_buffer = weechat_config_new_option (
irc_config_file, irc_config_section_look,
"part_closes_buffer", "boolean",
+1
View File
@@ -139,6 +139,7 @@ extern struct t_config_option *irc_config_look_notice_welcome_redirect;
extern struct t_config_option *irc_config_look_notice_welcome_tags;
extern struct t_config_option *irc_config_look_notify_tags_ison;
extern struct t_config_option *irc_config_look_notify_tags_whois;
extern struct t_config_option *irc_config_look_open_pv_buffer_echo_msg;
extern struct t_config_option *irc_config_look_part_closes_buffer;
extern struct t_config_option *irc_config_look_pv_buffer;
extern struct t_config_option *irc_config_look_pv_tags;
+2 -1
View File
@@ -3232,7 +3232,8 @@ IRC_PROTOCOL_CALLBACK(privmsg)
if (strcmp (ptr_channel->name, remote_nick) != 0)
irc_channel_pv_rename (server, ptr_channel, remote_nick);
}
else if (!nick_is_me || !cap_echo_message)
else if (!nick_is_me || !cap_echo_message
|| weechat_config_boolean (irc_config_look_open_pv_buffer_echo_msg))
{
ptr_channel = irc_channel_new (server,
IRC_CHANNEL_TYPE_PRIVATE,
@@ -2798,9 +2798,17 @@ TEST(IrcProtocolWithServer, privmsg)
{
/* with echo-message */
RECV(":alice!user@host PRIVMSG bob :this is the message ");
CHECK_PV_CLOSE("bob", "alice", "this is the message ",
"irc_privmsg,self_msg,notify_none,no_highlight,"
"prefix_nick_white,nick_alice,host_user@host,log1");
/* with echo-message, option irc.look.open_pv_buffer_echo_msg off */
config_file_option_set (irc_config_look_open_pv_buffer_echo_msg,
"off", 1);
RECV(":alice!user@host PRIVMSG bob :this is the message ");
CHECK_SRV("--", "Msg(alice) -> bob: this is the message ",
"irc_privmsg,self_msg,notify_none,no_highlight,"
"nick_alice,host_user@host,log1");
config_file_option_reset (irc_config_look_open_pv_buffer_echo_msg, 1);
}
/*
@@ -2819,9 +2827,17 @@ TEST(IrcProtocolWithServer, privmsg)
{
/* with echo-message */
RECV(":alice!user@host PRIVMSG nickserv :identify secret");
CHECK_PV_CLOSE("nickserv", "alice", "identify ******",
"irc_privmsg,self_msg,notify_none,no_highlight,"
"prefix_nick_white,nick_alice,host_user@host,log1");
/* with echo-message, option irc.look.open_pv_buffer_echo_msg off */
config_file_option_set (irc_config_look_open_pv_buffer_echo_msg,
"off", 1);
RECV(":alice!user@host PRIVMSG nickserv :identify secret");
CHECK_SRV("--", "Msg(alice) -> nickserv: identify ******",
"irc_privmsg,self_msg,notify_none,no_highlight,"
"nick_alice,host_user@host,log1");
config_file_option_reset (irc_config_look_open_pv_buffer_echo_msg, 1);
}
/* broken CTCP to channel */