From b8bef1c3e1c229e16b9bfef96500141f3922c712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 27 Mar 2026 18:32:31 +0100 Subject: [PATCH] irc: fix display of CTCP query sent multiple times to the same user when capability echo-message is enabled (closes #2309) --- CHANGELOG.md | 1 + src/plugins/irc/irc-protocol.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c66fa6833..f90536f39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ SPDX-License-Identifier: GPL-3.0-or-later - core: fix crash with `/eval` when the current buffer is closed in a command - core: fix buffer size in function util_parse_time, causing buffer overflow error in unit tests +- irc: fix display of CTCP query sent multiple times to the same user when capability echo-message is enabled ([#2309](https://github.com/weechat/weechat/issues/2309)) - irc: fix unit of server option `anti_flood` from seconds to milliseconds in output of `/server listfull` - irc: fix creation of irc.msgbuffer option without a server name - irc: ignore self join if the channel is already joined ([#2291](https://github.com/weechat/weechat/issues/2291)) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index ec5394885..6051a217d 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -2522,7 +2522,8 @@ IRC_PROTOCOL_CALLBACK(notice) "echo-message"); msg_already_received = weechat_hashtable_has_key ( ctxt->server->echo_msg_recv, ctxt->irc_message); - if (!msg_already_received && cap_echo_message) + if (!msg_already_received && cap_echo_message + && (strcmp (ctxt->nick, pos_target) == 0)) { time_now = time (NULL); weechat_hashtable_set (ctxt->server->echo_msg_recv, @@ -3228,7 +3229,8 @@ IRC_PROTOCOL_CALLBACK(privmsg) { msg_already_received = weechat_hashtable_has_key ( ctxt->server->echo_msg_recv, ctxt->irc_message); - if (!msg_already_received && cap_echo_message) + if (!msg_already_received && cap_echo_message + && (strcmp (ctxt->nick, remote_nick) == 0)) { time_now = time (NULL); weechat_hashtable_set (ctxt->server->echo_msg_recv,