log: don't log user quit to disabled channels

Fix #1925
This commit is contained in:
Alexey Sokolov
2025-03-16 21:58:34 +00:00
parent ce47e7ea3d
commit ebfe1143e4

View File

@@ -439,10 +439,14 @@ void CLogMod::OnKick(const CNick& OpNick, const CString& sKickedNick,
void CLogMod::OnQuit(const CNick& Nick, const CString& sMessage,
const vector<CChan*>& 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);
}
}
}