From 9ee0955d6b204999c6ec69ea0d87010c07c6646c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 3 Jan 2023 01:06:51 +0100 Subject: [PATCH] irc: properly rename private buffer on notice messages --- ChangeLog.adoc | 2 +- src/plugins/irc/irc-protocol.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index cf6ee33a7..d2658167b 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -50,7 +50,7 @@ Bug fixes:: * api: send NULL values to config section callbacks in scripting API (issue #1843) * api: fix function string_cut when there are non printable chars in suffix * api: do not expect any return value in callbacks "callback_change" and "callback_delete" of function config_new_option (scripting API) - * irc: properly rename private buffer on nick changes or private message when new nick is the same with different case + * irc: properly rename private buffer on nick changes or privmsg/notice message when new nick is the same with different case * irc: do not join channels in server autojoin option after reconnection to the server (issue #560, bug #21529) * irc: escape backslashes in raw buffer (issue #1838) * trigger: fix variables sent to focus callback (issue #1858) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index ef77c8159..07ee01be9 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -2428,6 +2428,10 @@ IRC_PROTOCOL_CALLBACK(notice) if (ptr_channel) { + /* rename buffer if open with nick case not matching */ + if (strcmp (ptr_channel->name, nick) != 0) + irc_channel_pv_rename (server, ptr_channel, nick); + if (weechat_config_boolean (irc_config_look_typing_status_nicks)) { irc_typing_channel_set_nick (ptr_channel, nick,