Moved AutoCycle() check to the caller instead of inside of Cycle()

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@157 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-04-20 05:35:24 +00:00
parent 10cbf756b3
commit 743fec50e2

View File

@@ -20,9 +20,7 @@ void CChan::Joined() {
}
void CChan::Cycle() const {
if (AutoCycle()) {
m_pUser->PutIRC("PART " + GetName() + "\r\nJOIN " + GetName() + " " + GetKey());
}
m_pUser->PutIRC("PART " + GetName() + "\r\nJOIN " + GetName() + " " + GetKey());
}
void CChan::JoinUser() {
@@ -290,7 +288,9 @@ bool CChan::RemNick(const string& sNick) {
CNick* pNick = m_msNicks.begin()->second;
if ((m_msNicks.size() == 1) && (!pNick->IsOp()) && (strcasecmp(pNick->GetNick().c_str(), m_pUser->GetCurNick().c_str()) == 0)) {
Cycle();
if (AutoCycle()) {
Cycle();
}
}
return true;