From ebfe1143e4f2498677fec473db680554896d4381 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 16 Mar 2025 21:58:34 +0000 Subject: [PATCH] log: don't log user quit to disabled channels Fix #1925 --- modules/log.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/log.cpp b/modules/log.cpp index 99628c3b..0d42546b 100644 --- a/modules/log.cpp +++ b/modules/log.cpp @@ -439,10 +439,14 @@ void CLogMod::OnKick(const CNick& OpNick, const CString& sKickedNick, void CLogMod::OnQuit(const CNick& Nick, const CString& sMessage, const vector& vChans) { if (NeedQuits()) { - for (CChan* pChan : vChans) + for (CChan* pChan : vChans) { + // Core calls this only for enabled channels, but + // OnSendToIRCMessage() below calls OnQuit() for all channels. + if (pChan->IsDisabled()) continue; PutLog("*** Quits: " + Nick.GetNick() + " (" + Nick.GetIdent() + "@" + Nick.GetHost() + ") (" + sMessage + ")", *pChan); + } } }