Permalink
Browse files

ResetJoinTries once we enable a channel

Fixes #83
  • Loading branch information...
Kyle Fuller
Kyle Fuller committed Mar 21, 2012
1 parent 7969e73 commit 6999c8222dd1210f20cb4ebbdbfd45dcf0528d95
Showing with 6 additions and 2 deletions.
  1. +1 −1 include/znc/Chan.h
  2. +5 −0 src/Chan.cpp
  3. +0 −1 src/IRCSock.cpp
View
@@ -116,7 +116,7 @@ class CChan {
void SetInConfig(bool b) { m_bInConfig = b; }
void SetCreationDate(unsigned long u) { m_ulCreationDate = u; }
void Disable() { m_bDisabled = true; }
- void Enable() { m_bDisabled = false; }
+ void Enable();
void IncJoinTries() { m_uJoinTries++; }
void ResetJoinTries() { m_uJoinTries = 0; }
// !Setters
View
@@ -567,3 +567,8 @@ void CChan::SendBuffer(CClient* pClient) {
}
}
}
+
+void CChan::Enable() {
+ ResetJoinTries();
+ m_bDisabled = false;
+}
View
@@ -520,7 +520,6 @@ void CIRCSock::ReadLine(const CString& sData) {
m_pNetwork->AddChan(sChan, false);
pChan = m_pNetwork->FindChan(sChan);
if (pChan) {
- pChan->ResetJoinTries();
pChan->Enable();
pChan->SetIsOn(true);
PutIRC("MODE " + sChan);

0 comments on commit 6999c82

Please sign in to comment.