From 743fec50e2695f589fe40d93aaff1ad45be5042b Mon Sep 17 00:00:00 2001 From: prozacx Date: Wed, 20 Apr 2005 05:35:24 +0000 Subject: [PATCH] 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 --- Chan.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Chan.cpp b/Chan.cpp index bc37182f..1ebd4bef 100644 --- a/Chan.cpp +++ b/Chan.cpp @@ -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;