mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Destroy the CIRCSock for a network when the CIRCNetwork is destroyed
This commit is contained in:
@@ -134,6 +134,11 @@ CIRCNetwork::CIRCNetwork(CUser *pUser, const CIRCNetwork *pNetwork, bool bCloneC
|
||||
}
|
||||
|
||||
CIRCNetwork::~CIRCNetwork() {
|
||||
if (m_pIRCSock) {
|
||||
CZNC::Get().GetManager().DelSockByAddr(m_pIRCSock);
|
||||
m_pIRCSock = NULL;
|
||||
}
|
||||
|
||||
// Delete clients
|
||||
for (vector<CClient*>::const_iterator it = m_vClients.begin(); it != m_vClients.end(); ++it) {
|
||||
CZNC::Get().GetManager().DelSockByAddr(*it);
|
||||
|
||||
Reference in New Issue
Block a user