From 0ba523d0712e390ac758c877a08fa6141355f07b Mon Sep 17 00:00:00 2001 From: ThePeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:48:12 +0200 Subject: [PATCH 1/2] Fix: private messages split into two windows over WeeChat's IRC relay When you send a private message, ZoiteChat sometimes gets the same message echoed back by the server so it can show it in the right window. Whether it recognizes that echo depended on the server first confirming a feature called "echo-message" during connection setup. WeeChat's relay doesn't seem to confirm that feature the way other servers (or ZNC) do, so ZoiteChat didn't recognize its own echoed messages and treated them as brand new incoming messages from yourself, opening a second, separate conversation window instead of using the one you were already typing in. This makes ZoiteChat recognize its own message by checking who sent it, instead of only trusting that feature confirmation. That way, sent and received messages always end up in the same conversation window, regardless of how well the server/relay announces its capabilities. --- src/common/proto-irc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index f9814ab6..d2491a15 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -1368,7 +1368,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[], { if (ignore_check (word[1], IG_PRIV)) return; - if (serv->have_echo_message && !serv->p_cmp (nick, serv->nick)) + if (!serv->p_cmp (nick, serv->nick)) { session *target_sess = find_dialog (serv, to); From c725adaa09e5433b6610aa1485cbd33dd50664a9 Mon Sep 17 00:00:00 2001 From: ThePeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com> Date: Thu, 3 Sep 2026 08:50:04 +0200 Subject: [PATCH 2/2] Fix CTCP ACTION not rerouting self-sent /me to correct PM window Mirrors the PRIVMSG fix: replayed /me messages sent by our own nick via WeeChat relay backlog were always passed with fromme=FALSE, so they never got rerouted to the actual PM query window. --- src/common/ctcp.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/common/ctcp.c b/src/common/ctcp.c index 37f8419e..cb7276b7 100644 --- a/src/common/ctcp.c +++ b/src/common/ctcp.c @@ -126,7 +126,21 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, if (ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset)) goto generic; - inbound_action (sess, to, nick, ip, msg + 7, FALSE, tags_data->identified, tags_data); + { + gboolean fromme = !serv->p_cmp (nick, serv->nick); + + if (fromme && !is_channel (serv, to)) + { + session *target = find_dialog (serv, to); + + if (target) + sess = target; + else if (serv->front_session) + sess = serv->front_session; + } + + inbound_action (sess, to, nick, ip, msg + 7, fromme, tags_data->identified, tags_data); + } return; }