Permalink
Browse files

ResetJoinTries once we enable a channel

Fixes #83
  • Loading branch information...
1 parent 63a5de1 commit 90896da6a7dec2fd355ef54a3d5d078b42d4e21c Kyle Fuller committed Mar 21, 2012
Showing with 6 additions and 2 deletions.
  1. +5 −0 Chan.cpp
  2. +1 −1 Chan.h
  3. +0 −1 IRCSock.cpp
View
@@ -605,3 +605,8 @@ void CChan::SendBuffer(CClient* pClient) {
}
}
}
+
+void CChan::Enable() {
+ ResetJoinTries();
+ m_bDisabled = false;
+}
View
2 Chan.h
@@ -113,7 +113,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
@@ -469,7 +469,6 @@ void CIRCSock::ReadLine(const CString& sData) {
m_pUser->AddChan(sChan, false);
pChan = m_pUser->FindChan(sChan);
if (pChan) {
- pChan->ResetJoinTries();
pChan->Enable();
pChan->SetIsOn(true);
PutIRC("MODE " + sChan);

0 comments on commit 90896da

Please sign in to comment.