Bugfix: Only reply to a client's MODE request if we actually know the answer

(Plus some indent fixup)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1290 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-12-13 17:01:55 +00:00
parent 4b1fbab6eb
commit d97ef37d27

View File

@@ -281,12 +281,12 @@ void CClient::ReadLine(const CString& sData) {
if (m_pUser->IsChan(sTarget)) {
CChan *pChan = m_pUser->FindChan(sTarget);
if (pChan && sModes.empty()) {
if (pChan && sModes.empty() && !pChan->GetModeString().empty()) {
PutClient(":" + m_pUser->GetIRCServer() + " 324 " + GetNick() + " " + sTarget + " " + pChan->GetModeString());
if (pChan->GetCreationDate() > 0) {
PutClient(":" + m_pUser->GetIRCServer() + " 329 " + GetNick() + " " + sTarget + " " + CString(pChan->GetCreationDate()));
}
return;
return;
}
}
} else if (sCommand.Equals("QUIT")) {