Avoid calling OnWho on every channel in the network WHO was called in. (#1461)

This commit is contained in:
weabot
2017-12-02 18:31:04 -05:00
committed by Alexey Sokolov
parent 5c1fb61f45
commit 5132ea987e
+6 -8
View File
@@ -856,15 +856,13 @@ bool CIRCSock::OnNumericMessage(CNumericMessage& Message) {
m_pNetwork->SetIRCNick(m_Nick);
m_pNetwork->SetIRCServer(sServer);
const vector<CChan*>& vChans = m_pNetwork->GetChans();
for (CChan* pChan : vChans) {
pChan->OnWho(sNick, sIdent, sHost);
}
CChan* pChan = m_pNetwork->FindChan(sChan);
if (pChan && pChan->IsDetached()) {
return true;
if (pChan) {
pChan->OnWho(sNick, sIdent, sHost);
if (pChan->IsDetached()) {
return true;
}
}
break;