From 299aa6117c3b11664893493587b4b51f85d9b5ce Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 11 Nov 2023 21:24:09 +0300 Subject: fixes #3909 (Tabsrmm + IRC: same user's leaving events in chats) --- protocols/IRCG/src/commandmonitor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/IRCG/src') diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 17e705b1dc..e6abc20f30 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -367,7 +367,11 @@ bool CIrcProto::OnIrc_QUIT(const CIrcMessage *pmsg) { if (pmsg->m_bIncoming) { CMStringW host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost; - DoEvent(GC_EVENT_QUIT, nullptr, pmsg->prefix.sNick, pmsg->parameters.getCount() > 0 ? pmsg->parameters[0].c_str() : nullptr, nullptr, host, NULL, true, false); + for (auto &si : g_chatApi.arSessions) + if (!mir_strcmp(si->pszModule, m_szModuleName)) + if (g_chatApi.UM_FindUser(si, pmsg->prefix.sNick)) + DoEvent(GC_EVENT_QUIT, si->ptszID, pmsg->prefix.sNick, pmsg->parameters.getCount() > 0 ? pmsg->parameters[0].c_str() : nullptr, nullptr, host, NULL, true, false); + CONTACT user = { pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, false, false, false }; CList_SetOffline(&user); if (pmsg->prefix.sNick == m_info.sNick) -- cgit v1.2.3