From: <kr...@us...> - 2008-09-07 11:23:50
|
Revision: 1191 http://znc.svn.sourceforge.net/znc/?rev=1191&view=rev Author: kroimon Date: 2008-09-07 11:23:57 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Removed AutoCycle from core Modified Paths: -------------- trunk/Chan.cpp trunk/Chan.h trunk/User.cpp trunk/User.h trunk/modules/webadmin.cpp trunk/znc.cpp Modified: trunk/Chan.cpp =================================================================== --- trunk/Chan.cpp 2008-09-05 19:46:43 UTC (rev 1190) +++ trunk/Chan.cpp 2008-09-07 11:23:57 UTC (rev 1191) @@ -22,7 +22,6 @@ m_bInConfig = bInConfig; m_Nick.SetUser(pUser); - m_bAutoCycle = m_pUser->AutoCycle(); m_bDetached = false; m_uBufferCount = m_pUser->GetBufferCount(); m_bKeepBuffer = m_pUser->KeepBuffer(); @@ -63,8 +62,6 @@ File.Write("\t\tKeepBuffer = " + CString((KeepBuffer()) ? "true" : "false") + "\n"); if (IsDetached()) File.Write("\t\tDetached = true\n"); - if (m_pUser->AutoCycle() != AutoCycle()) - File.Write("\t\tAutoCycle = " + CString((AutoCycle()) ? "true" : "false") + "\n"); if (!GetKey().empty()) { File.Write("\t\tKey = " + GetKey() + "\n"); } if (!GetDefaultModes().empty()) { File.Write("\t\tModes = " + GetDefaultModes() + "\n"); } @@ -76,7 +73,6 @@ // We assume that m_sName and m_pUser are equal SetBufferCount(chan.GetBufferCount()); SetKeepBuffer(chan.KeepBuffer()); - SetAutoCycle(chan.AutoCycle()); SetKey(chan.GetKey()); SetDefaultModes(chan.GetDefaultModes()); @@ -356,10 +352,6 @@ sRet += (sRet.empty()) ? "Detached" : ", Detached"; } - if (AutoCycle()) { - sRet += (sRet.empty()) ? "AutoCycle" : ", AutoCycle"; - } - if (KeepBuffer()) { sRet += (sRet.empty()) ? "KeepBuffer" : ", KeepBuffer"; } @@ -530,16 +522,6 @@ delete it->second; m_msNicks.erase(it); - if (m_msNicks.size() == 1) { - CNick* pNick = m_msNicks.begin()->second; - - if (!pNick->HasPerm(Op) && pNick->GetNick().CaseCmp(m_pUser->GetCurNick()) == 0) { - if (AutoCycle()) { - Cycle(); - } - } - } - return true; } Modified: trunk/Chan.h =================================================================== --- trunk/Chan.h 2008-09-05 19:46:43 UTC (rev 1190) +++ trunk/Chan.h 2008-09-07 11:23:57 UTC (rev 1191) @@ -112,7 +112,6 @@ void SetDefaultModes(const CString& s) { m_sDefaultModes = s; } void SetBufferCount(unsigned int u) { m_uBufferCount = u; } void SetKeepBuffer(bool b) { m_bKeepBuffer = b; } - void SetAutoCycle(bool b) { m_bAutoCycle = b; } void SetWhoDone(bool b = true) { m_bWhoDone = b; } void SetDetached(bool b = true) { m_bDetached = b; } void SetInConfig(bool b) { m_bInConfig = b; } @@ -143,7 +142,6 @@ unsigned int GetNickCount() const { return m_msNicks.size(); } unsigned int GetBufferCount() const { return m_uBufferCount; } bool KeepBuffer() const { return m_bKeepBuffer; } - bool AutoCycle() const { return m_bAutoCycle; } bool IsDetached() const { return m_bDetached; } bool InConfig() const { return m_bInConfig; } unsigned long GetCreationDate() const { return m_ulCreationDate; } @@ -156,7 +154,6 @@ bool m_bIsOn; bool m_bWhoDone; bool m_bKeepBuffer; - bool m_bAutoCycle; bool m_bInConfig; bool m_bDisabled; CString m_sName; Modified: trunk/User.cpp =================================================================== --- trunk/User.cpp 2008-09-05 19:46:43 UTC (rev 1190) +++ trunk/User.cpp 2008-09-07 11:23:57 UTC (rev 1191) @@ -43,7 +43,6 @@ m_uMaxJoinTries = 0; m_uMaxJoins = 5; m_bKeepBuffer = false; - m_bAutoCycle = true; m_bBeingDeleted = false; m_sTimestampFormat = "[%H:%M:%S]"; m_bAppendTimestamp = false; @@ -419,7 +418,6 @@ // Flags SetKeepBuffer(User.KeepBuffer()); - SetAutoCycle(User.AutoCycle()); SetMultiClients(User.MultiClients()); SetBounceDCCs(User.BounceDCCs()); SetUseClientIP(User.UseClientIP()); @@ -577,7 +575,6 @@ PrintLine(File, "KeepBuffer", CString((KeepBuffer()) ? "true" : "false")); PrintLine(File, "MultiClients", CString((MultiClients()) ? "true" : "false")); PrintLine(File, "BounceDCCs", CString((BounceDCCs()) ? "true" : "false")); - PrintLine(File, "AutoCycle", CString((AutoCycle()) ? "true" : "false")); PrintLine(File, "DenyLoadMod", CString((DenyLoadMod()) ? "true" : "false")); PrintLine(File, "Admin", CString((IsAdmin()) ? "true" : "false")); PrintLine(File, "DenySetVHost", CString((DenySetVHost()) ? "true" : "false")); @@ -1036,7 +1033,6 @@ void CUser::SetQuitMsg(const CString& s) { m_sQuitMsg = s; } void CUser::SetBufferCount(unsigned int u) { m_uBufferCount = u; } void CUser::SetKeepBuffer(bool b) { m_bKeepBuffer = b; } -void CUser::SetAutoCycle(bool b) { m_bAutoCycle = b; } void CUser::CheckIRCConnect() { @@ -1114,5 +1110,4 @@ const MCString& CUser::GetCTCPReplies() const { return m_mssCTCPReplies; } unsigned int CUser::GetBufferCount() const { return m_uBufferCount; } bool CUser::KeepBuffer() const { return m_bKeepBuffer; } -bool CUser::AutoCycle() const { return m_bAutoCycle; } // !Getters Modified: trunk/User.h =================================================================== --- trunk/User.h 2008-09-05 19:46:43 UTC (rev 1190) +++ trunk/User.h 2008-09-07 11:23:57 UTC (rev 1191) @@ -133,7 +133,6 @@ bool AddCTCPReply(const CString& sCTCP, const CString& sReply); void SetBufferCount(unsigned int u); void SetKeepBuffer(bool b); - void SetAutoCycle(bool b); void SetChanPrefixes(const CString& s) { m_sChanPrefixes = s; } void SetBeingDeleted(bool b) { m_bBeingDeleted = b; } void SetTimestampFormat(const CString& s) { m_sTimestampFormat = s; } @@ -187,7 +186,6 @@ const MCString& GetCTCPReplies() const; unsigned int GetBufferCount() const; bool KeepBuffer() const; - bool AutoCycle() const; bool IsBeingDeleted() const { return m_bBeingDeleted; } bool HasServers() const { return m_vServers.size() > 0; } float GetTimezoneOffset() const { return m_fTimezoneOffset; } @@ -234,7 +232,6 @@ bool m_bAdmin; bool m_bDenySetVHost; bool m_bKeepBuffer; - bool m_bAutoCycle; bool m_bBeingDeleted; bool m_bAppendTimestamp; bool m_bPrependTimestamp; Modified: trunk/modules/webadmin.cpp =================================================================== --- trunk/modules/webadmin.cpp 2008-09-05 19:46:43 UTC (rev 1190) +++ trunk/modules/webadmin.cpp 2008-09-07 11:23:57 UTC (rev 1191) @@ -684,10 +684,7 @@ m_Template["InConfig"] = "true"; } - CTemplate& o1 = m_Template.AddRow("OptionLoop"); - o1["Name"] = "autocycle"; - o1["DisplayName"] = "Auto Cycle"; - if ((pChan && pChan->AutoCycle()) || (!pChan && m_pUser->AutoCycle())) { o1["Checked"] = "true"; } + /* o1 used to be AutoCycle which was removed */ CTemplate& o2 = m_Template.AddRow("OptionLoop"); o2["Name"] = "keepbuffer"; @@ -723,7 +720,6 @@ pChan->SetDefaultModes(GetParam("defmodes")); pChan->SetBufferCount(GetParam("buffercount").ToUInt()); pChan->SetInConfig(GetParam("save").ToBool()); - pChan->SetAutoCycle(GetParam("autocycle").ToBool()); pChan->SetKeepBuffer(GetParam("keepbuffer").ToBool()); bool bDetached = GetParam("detached").ToBool(); @@ -891,10 +887,7 @@ o1["DisplayName"] = "Keep Buffer"; if (!pUser || pUser->KeepBuffer()) { o1["Checked"] = "true"; } - CTemplate& o2 = m_Template.AddRow("OptionLoop"); - o2["Name"] = "autocycle"; - o2["DisplayName"] = "Auto Cycle"; - if (!pUser || pUser->AutoCycle()) { o2["Checked"] = "true"; } + /* o2 used to be auto cycle which was removed */ CTemplate& o4 = m_Template.AddRow("OptionLoop"); o4["Name"] = "multiclients"; @@ -1112,7 +1105,6 @@ pNewUser->SetKeepBuffer(GetParam("keepbuffer").ToBool()); pNewUser->SetMultiClients(GetParam("multiclients").ToBool()); pNewUser->SetBounceDCCs(GetParam("bouncedccs").ToBool()); - pNewUser->SetAutoCycle(GetParam("autocycle").ToBool()); pNewUser->SetUseClientIP(GetParam("useclientip").ToBool()); pNewUser->SetTimestampAppend(GetParam("appendtimestamp").ToBool()); pNewUser->SetTimestampPrepend(GetParam("prependtimestamp").ToBool()); Modified: trunk/znc.cpp =================================================================== --- trunk/znc.cpp 2008-09-05 19:46:43 UTC (rev 1190) +++ trunk/znc.cpp 2008-09-07 11:23:57 UTC (rev 1191) @@ -1134,7 +1134,9 @@ pChan->SetDetached((sValue.CaseCmp("true") == 0)); continue; } else if (sName.CaseCmp("AutoCycle") == 0) { - pChan->SetAutoCycle((sValue.CaseCmp("true") == 0)); + if (sValue.CaseCmp("true") == 0) { + CUtils::PrintError("WARNING: AutoCycle has been removed, instead try -> LoadModule = autocycle " + pChan->GetName()); + } continue; } else if (sName.CaseCmp("Key") == 0) { pChan->SetKey(sValue); @@ -1150,9 +1152,6 @@ } 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; @@ -1168,6 +1167,11 @@ } else if (sName.CaseCmp("AwaySuffix") == 0) { CUtils::PrintMessage("WARNING: AwaySuffix has been depricated, instead try -> LoadModule = awaynick %nick%_" + sValue); continue; + } else if (sName.CaseCmp("AutoCycle") == 0) { + if (sValue.CaseCmp("true") == 0) { + CUtils::PrintError("WARNING: AutoCycle has been removed, instead try -> LoadModule = autocycle"); + } + continue; } else if (sName.CaseCmp("Pass") == 0) { // There are different formats for this available: // Pass = <plain text> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |