Revert StripControls implementation (#850)

This reverts commits 27d78795a7 and
f27109f1b4. It was decided that the
functionality is provided by a separate module instead, to avoid
unnecessarily bloating the core.
This commit is contained in:
J-P Nurmi
2015-03-04 09:41:52 +01:00
parent a67f929b7d
commit a5b4a29c00
8 changed files with 1 additions and 124 deletions
-26
View File
@@ -33,8 +33,6 @@ CChan::CChan(const CString& sName, CIRCNetwork* pNetwork, bool bInConfig, CConfi
m_bDisabled(false),
m_bHasBufferCountSet(false),
m_bHasAutoClearChanBufferSet(false),
m_bStripControls(false),
m_bHasStripControlsSet(false),
m_sName(sName.Token(0)),
m_sKey(sName.Token(1)),
m_sTopic(""),
@@ -70,8 +68,6 @@ CChan::CChan(const CString& sName, CIRCNetwork* pNetwork, bool bInConfig, CConfi
if (pConfig->FindStringEntry("disabled", sValue))
if (sValue.ToBool())
Disable();
if (pConfig->FindStringEntry("stripcontrols", sValue))
SetStripControls(sValue.ToBool());
if (pConfig->FindStringEntry("autocycle", sValue))
if (sValue.Equals("true"))
CUtils::PrintError("WARNING: AutoCycle has been removed, instead try -> LoadModule = autocycle " + sName);
@@ -110,8 +106,6 @@ CConfig CChan::ToConfig() const {
config.AddKeyValuePair("Detached", "true");
if (IsDisabled())
config.AddKeyValuePair("Disabled", "true");
if (m_bHasStripControlsSet)
config.AddKeyValuePair("StripControls", CString(StripControls()));
if (!GetKey().empty())
config.AddKeyValuePair("Key", GetKey());
if (!GetDefaultModes().empty())
@@ -124,7 +118,6 @@ void CChan::Clone(CChan& chan) {
// We assume that m_sName and m_pNetwork are equal
SetBufferCount(chan.GetBufferCount(), true);
SetAutoClearChanBuffer(chan.AutoClearChanBuffer());
SetStripControls(chan.StripControls());
SetKey(chan.GetKey());
SetDefaultModes(chan.GetDefaultModes());
@@ -269,17 +262,6 @@ void CChan::InheritAutoClearChanBuffer(bool b) {
}
}
void CChan::SetStripControls(bool b) {
m_bHasStripControlsSet = true;
m_bStripControls = b;
}
void CChan::InheritStripControls(bool b) {
if (!m_bHasStripControlsSet) {
m_bStripControls = b;
}
}
void CChan::OnWho(const CString& sNick, const CString& sIdent, const CString& sHost) {
CNick* pNick = FindNick(sNick);
@@ -414,14 +396,6 @@ CString CChan::GetOptions() const {
}
}
if (StripControls()) {
if (HasStripControlsSet()) {
vsRet.push_back("StripControls");
} else {
vsRet.push_back("StripControls (default)");
}
}
return CString(", ").Join(vsRet.begin(), vsRet.end());
}