From d3ffdbb2a62c111c80705b42ca8254d27f248010 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Wed, 24 Aug 2011 23:36:13 +0100 Subject: [PATCH] Part the client from the channels they are in when they used /znc JumpNetwork --- Client.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Client.cpp b/Client.cpp index e45917b8..6d0ddc3d 100644 --- a/Client.cpp +++ b/Client.cpp @@ -502,6 +502,14 @@ void CClient::SetNetwork(CIRCNetwork* pNetwork, bool bDisconnect, bool bReconnec if (bDisconnect) { if (m_pNetwork) { m_pNetwork->ClientDisconnected(this); + + // Tell the client they are no longer in these channels. + const vector& vChans = m_pNetwork->GetChans(); + for (vector::const_iterator it = vChans.begin(); it != vChans.end(); ++it) { + if (!((*it)->IsDetached())) { + PutClient(":" + m_pNetwork->GetIRCNick().GetNickMask() + " PART " + (*it)->GetName()); + } + } } else if (m_pUser) { m_pUser->UserDisconnected(this); }