mirror of
https://github.com/znc/znc.git
synced 2026-08-09 18:32:55 +02:00
Removed AutoCycle from core
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1191 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -22,7 +22,6 @@ CChan::CChan(const CString& sName, CUser* pUser, bool bInConfig) {
|
||||
|
||||
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 @@ bool CChan::WriteConfig(CFile& File) {
|
||||
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 @@ void CChan::Clone(CChan& chan) {
|
||||
// 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 @@ CString CChan::GetOptions() const {
|
||||
sRet += (sRet.empty()) ? "Detached" : ", Detached";
|
||||
}
|
||||
|
||||
if (AutoCycle()) {
|
||||
sRet += (sRet.empty()) ? "AutoCycle" : ", AutoCycle";
|
||||
}
|
||||
|
||||
if (KeepBuffer()) {
|
||||
sRet += (sRet.empty()) ? "KeepBuffer" : ", KeepBuffer";
|
||||
}
|
||||
@@ -530,16 +522,6 @@ bool CChan::RemNick(const CString& sNick) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@ public:
|
||||
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 @@ public:
|
||||
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 @@ protected:
|
||||
bool m_bIsOn;
|
||||
bool m_bWhoDone;
|
||||
bool m_bKeepBuffer;
|
||||
bool m_bAutoCycle;
|
||||
bool m_bInConfig;
|
||||
bool m_bDisabled;
|
||||
CString m_sName;
|
||||
|
||||
@@ -43,7 +43,6 @@ CUser::CUser(const CString& sUserName) {
|
||||
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 @@ bool CUser::Clone(const CUser& User, CString& sErrorRet, bool bCloneChans) {
|
||||
|
||||
// Flags
|
||||
SetKeepBuffer(User.KeepBuffer());
|
||||
SetAutoCycle(User.AutoCycle());
|
||||
SetMultiClients(User.MultiClients());
|
||||
SetBounceDCCs(User.BounceDCCs());
|
||||
SetUseClientIP(User.UseClientIP());
|
||||
@@ -577,7 +575,6 @@ bool CUser::WriteConfig(CFile& File) {
|
||||
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::SetIRCServer(const CString& s) { m_sIRCServer = s; }
|
||||
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 @@ CString CUser::GetQuitMsg() const { return (!m_sQuitMsg.empty()) ? m_sQuitMsg :
|
||||
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
|
||||
|
||||
@@ -133,7 +133,6 @@ public:
|
||||
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 @@ public:
|
||||
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 @@ protected:
|
||||
bool m_bAdmin;
|
||||
bool m_bDenySetVHost;
|
||||
bool m_bKeepBuffer;
|
||||
bool m_bAutoCycle;
|
||||
bool m_bBeingDeleted;
|
||||
bool m_bAppendTimestamp;
|
||||
bool m_bPrependTimestamp;
|
||||
|
||||
+2
-10
@@ -684,10 +684,7 @@ bool CWebAdminSock::ChanPage(CString& sPageRet, CChan* pChan) {
|
||||
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 @@ bool CWebAdminSock::ChanPage(CString& sPageRet, CChan* pChan) {
|
||||
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 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
|
||||
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 @@ CUser* CWebAdminSock::GetNewUser(CString& sPageRet, CUser* pUser) {
|
||||
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());
|
||||
|
||||
@@ -1134,7 +1134,9 @@ bool CZNC::DoRehash(CString& sError)
|
||||
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 @@ bool CZNC::DoRehash(CString& sError)
|
||||
} 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 @@ bool CZNC::DoRehash(CString& sError)
|
||||
} 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>
|
||||
|
||||
Reference in New Issue
Block a user