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:
prozacx
2006-09-16 20:47:43 +00:00
parent fa3b955468
commit 05cae3d281
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -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();
}
}