From 96f1ab2763db07ee4fa511797357621a6b920896 Mon Sep 17 00:00:00 2001 From: prozacx Date: Tue, 5 Jul 2005 09:23:04 +0000 Subject: [PATCH] Added AutoCycle to CUser git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@411 726aef4b-f618-498e-8847-2d620e286838 --- Chan.cpp | 2 +- znc.cpp | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Chan.cpp b/Chan.cpp index 68a68229..0e45a87f 100644 --- a/Chan.cpp +++ b/Chan.cpp @@ -14,7 +14,7 @@ CChan::CChan(const CString& sName, CUser* pUser) { m_pUser = pUser; m_Nick.SetUser(pUser); - m_bAutoCycle = true; + m_bAutoCycle = m_pUser->AutoCycle(); m_bDetached = false; m_uBufferCount = m_pUser->GetBufferCount(); m_bKeepBuffer = m_pUser->KeepBuffer(); diff --git a/znc.cpp b/znc.cpp index 4e8e490e..7b98f19f 100644 --- a/znc.cpp +++ b/znc.cpp @@ -589,7 +589,6 @@ bool CZNC::ParseConfig(const CString& sConfig) { CString sLine; bool bCommented = false; // support for /**/ style comments - bool bAutoCycle = true; CUser* pUser = NULL; // Used to keep track of which user block we are in CChan* pChan = NULL; // Used to keep track of which chan block we are in @@ -671,7 +670,6 @@ bool CZNC::ParseConfig(const CString& sConfig) { pUser = new CUser(sValue, this); CUtils::PrintMessage("Loading user [" + sValue + "]"); - bAutoCycle = true; if (!sStatusPrefix.empty()) { if (!pUser->SetStatusPrefix(sStatusPrefix)) { @@ -693,7 +691,6 @@ bool CZNC::ParseConfig(const CString& sConfig) { } pChan = new CChan(sValue, pUser); - pChan->SetAutoCycle(bAutoCycle); continue; } } @@ -737,6 +734,9 @@ bool CZNC::ParseConfig(const CString& sConfig) { } else if (sName.CaseCmp("KeepBuffer") == 0) { pUser->SetKeepBuffer((sValue.CaseCmp("true") == 0)); continue; + } else if (sName.CaseCmp("AutoCycle") == 0) { + pUser->SetAutoCycle((sValue.CaseCmp("true") == 0)); + continue; } else if (sName.CaseCmp("Nick") == 0) { pUser->SetNick(sValue); continue; @@ -765,9 +765,6 @@ bool CZNC::ParseConfig(const CString& sConfig) { } else if (sName.CaseCmp("BounceDCCs") == 0) { pUser->SetBounceDCCs(sValue.CaseCmp("true") == 0); continue; - } else if (sName.CaseCmp("AutoCycle") == 0) { - bAutoCycle = (sValue.CaseCmp("true") == 0); - continue; } else if (sName.CaseCmp("Ident") == 0) { pUser->SetIdent(sValue); continue;