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

This reverts commit 5132ea987e.

Add a comment to explain the old behavior, by courtesy of @psychon
This commit is contained in:
Alexey Sokolov
2017-12-10 09:50:26 +00:00
parent 5132ea987e
commit 9bb8387745
+13 -5
View File
@@ -856,13 +856,21 @@ bool CIRCSock::OnNumericMessage(CNumericMessage& Message) {
m_pNetwork->SetIRCNick(m_Nick);
m_pNetwork->SetIRCServer(sServer);
CChan* pChan = m_pNetwork->FindChan(sChan);
// A nick can only have one ident and hostname. Yes, you can query
// this information per-channel, but it is still global. For
// example, if the client supports UHNAMES, but the IRC server does
// not, then AFAIR "passive snooping of WHO replies" is the only way
// that ZNC can figure out the ident and host for the UHNAMES
// replies.
const vector<CChan*>& vChans = m_pNetwork->GetChans();
if (pChan) {
for (CChan* pChan : vChans) {
pChan->OnWho(sNick, sIdent, sHost);
if (pChan->IsDetached()) {
return true;
}
}
CChan* pChan = m_pNetwork->FindChan(sChan);
if (pChan && pChan->IsDetached()) {
return true;
}
break;