From aff0335f7e9ed889d382a7b1baab1bc133f24ed4 Mon Sep 17 00:00:00 2001 From: deepend Date: Sat, 27 Jun 2026 01:42:23 -0600 Subject: [PATCH] Fix self-echoed PM routing to target tab --- src/common/proto-irc.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index 101b256f..f9814ab6 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -1368,7 +1368,20 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[], { if (ignore_check (word[1], IG_PRIV)) return; - inbound_privmsg (serv, nick, ip, text, tags_data->identified, tags_data); + if (serv->have_echo_message && !serv->p_cmp (nick, serv->nick)) + { + session *target_sess = find_dialog (serv, to); + + if (!target_sess) + target_sess = find_channel (serv, to); + if (target_sess) + inbound_chanmsg (serv, target_sess, target_sess->channel, nick, text, TRUE, tags_data->identified, tags_data); + else if (serv->front_session) + EMIT_SIGNAL_TIMESTAMP (XP_TE_MSGSEND, serv->front_session, to, text, NULL, NULL, 0, tags_data->timestamp); + } else + { + inbound_privmsg (serv, nick, ip, text, tags_data->identified, tags_data); + } } } }