mirror of
https://github.com/znc/znc.git
synced 2026-07-05 17:31:06 +02:00
Patched using reset_chans.patch by psycho
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@772 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+12
@@ -782,6 +782,8 @@ void CIRCSock::Disconnected() {
|
||||
if (!m_pUser->IsBeingDeleted()) {
|
||||
m_pUser->PutStatus("Disconnected from IRC. Reconnecting...");
|
||||
}
|
||||
|
||||
ResetChans();
|
||||
}
|
||||
|
||||
void CIRCSock::SockError(int iErrno) {
|
||||
@@ -789,6 +791,8 @@ void CIRCSock::SockError(int iErrno) {
|
||||
if (!m_pUser->IsBeingDeleted()) {
|
||||
m_pUser->PutStatus("Disconnected from IRC. Reconnecting...");
|
||||
}
|
||||
|
||||
ResetChans();
|
||||
}
|
||||
|
||||
void CIRCSock::Timeout() {
|
||||
@@ -796,6 +800,8 @@ void CIRCSock::Timeout() {
|
||||
if (!m_pUser->IsBeingDeleted()) {
|
||||
m_pUser->PutStatus("IRC connection timed out. Reconnecting...");
|
||||
}
|
||||
|
||||
ResetChans();
|
||||
}
|
||||
|
||||
void CIRCSock::ConnectionRefused() {
|
||||
@@ -870,3 +876,9 @@ CIRCSock::EChanModeArgs CIRCSock::GetModeType(unsigned char uMode) const {
|
||||
return it->second;
|
||||
}
|
||||
|
||||
void CIRCSock::ResetChans() {
|
||||
for (map<CString, CChan*>::iterator a = m_msChans.begin(); a != m_msChans.end(); a++) {
|
||||
a->second->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user