Destroy the CIRCSock for a network when the CIRCNetwork is destroyed

This commit is contained in:
Kyle Fuller
2011-09-05 20:16:10 +00:00
parent 8945fbeb48
commit 855e0778ac
2 changed files with 5 additions and 11 deletions

11
znc.cpp
View File

@@ -169,17 +169,6 @@ bool CZNC::HandleUserDeletion()
continue;
}
m_msUsers.erase(pUser->GetUserName());
vector<CIRCNetwork*> vNetworks;
for (vector<CIRCNetwork*>::iterator it2 = vNetworks.begin(); it2 != vNetworks.end(); ++it2) {
CIRCNetwork *pNetwork = *it2;
CIRCSock* pIRCSock = pNetwork->GetIRCSock();
if (pIRCSock) {
m_Manager.DelSockByAddr(pIRCSock);
}
}
CWebSock::FinishUserSessions(*pUser);
delete pUser;
}