mirror of
https://github.com/znc/znc.git
synced 2026-08-11 19:32:46 +02:00
Revert StripControls implementation (#850)
This reverts commits27d78795a7andf27109f1b4. It was decided that the functionality is provided by a separate module instead, to avoid unnecessarily bloating the core.
This commit is contained in:
@@ -121,7 +121,6 @@ class CAdminMod : public CModule {
|
||||
{"Encoding", str},
|
||||
#endif
|
||||
{"QuitMsg", str},
|
||||
{"StripControls", boolean},
|
||||
};
|
||||
PrintVarsHelp(sVarFilter, nvars, ARRAY_SIZE(nvars), "The following variables are available when using the SetNetwork/GetNetwork commands:");
|
||||
}
|
||||
@@ -133,8 +132,7 @@ class CAdminMod : public CModule {
|
||||
{"Buffer", integer},
|
||||
{"InConfig", boolean},
|
||||
{"AutoClearChanBuffer", boolean},
|
||||
{"Detached", boolean},
|
||||
{"StripControls", boolean},
|
||||
{"Detached", boolean}
|
||||
};
|
||||
PrintVarsHelp(sVarFilter, cvars, ARRAY_SIZE(cvars), "The following variables are available when using the SetChan/GetChan commands:");
|
||||
}
|
||||
@@ -498,8 +496,6 @@ class CAdminMod : public CModule {
|
||||
#endif
|
||||
} else if (sVar.Equals("quitmsg")) {
|
||||
PutModule("QuitMsg = " + pNetwork->GetQuitMsg());
|
||||
} else if (sVar.Equals("stripcontrols")) {
|
||||
PutModule("StripControls = " + CString(pNetwork->StripControls()));
|
||||
} else {
|
||||
PutModule("Error: Unknown variable");
|
||||
}
|
||||
@@ -593,10 +589,6 @@ class CAdminMod : public CModule {
|
||||
} else if (sVar.Equals("quitmsg")) {
|
||||
pNetwork->SetQuitMsg(sValue);
|
||||
PutModule("QuitMsg = " + pNetwork->GetQuitMsg());
|
||||
} else if (sVar == "stripcontrols") {
|
||||
bool b = sValue.ToBool();
|
||||
pNetwork->SetStripControls(b);
|
||||
PutModule("StripControls = " + CString(b));
|
||||
} else {
|
||||
PutModule("Error: Unknown variable");
|
||||
}
|
||||
@@ -716,12 +708,6 @@ class CAdminMod : public CModule {
|
||||
PutModule(pChan->GetName() + ": AutoClearChanBuffer = " + sValue);
|
||||
} else if (sVar == "detached") {
|
||||
PutModule(pChan->GetName() + ": Detached = " + CString(pChan->IsDetached()));
|
||||
} else if (sVar == "stripcontrols") {
|
||||
CString sValue(pChan->StripControls());
|
||||
if (!pChan->HasStripControlsSet()) {
|
||||
sValue += " (default)";
|
||||
}
|
||||
PutModule(pChan->GetName() + ": StripControls = " + sValue);
|
||||
} else if (sVar == "key") {
|
||||
PutModule(pChan->GetName() + ": Key = " + pChan->GetKey());
|
||||
} else {
|
||||
@@ -793,10 +779,6 @@ class CAdminMod : public CModule {
|
||||
pChan->AttachUser();
|
||||
}
|
||||
PutModule(pChan->GetName() + ": Detached = " + CString(b));
|
||||
} else if (sVar == "stripcontrols") {
|
||||
bool b = sValue.ToBool();
|
||||
pChan->SetStripControls(b);
|
||||
PutModule(pChan->GetName() + ": StripControls = " + CString(b));
|
||||
} else if (sVar == "key") {
|
||||
pChan->SetKey(sValue);
|
||||
PutModule(pChan->GetName() + ": Key = " + sValue);
|
||||
|
||||
@@ -129,16 +129,6 @@
|
||||
<? INC encoding_settings.tmpl ?>
|
||||
</div>
|
||||
|
||||
<div class="subsection">
|
||||
<div class="inputlabel">Strip Controls:</div>
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" name="stripcontrols" id="stripcontrols_checkbox"
|
||||
title="Strips control codes (Colors, Bold, ..) from channel and private messages."
|
||||
<? IF StripControls ?>checked="checked"<? ENDIF ?> />
|
||||
<label for="stripcontrols_checkbox">Enabled</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -666,11 +666,6 @@ public:
|
||||
o4["DisplayName"] = "Disabled";
|
||||
if (pChan && pChan->IsDisabled()) { o4["Checked"] = "true"; }
|
||||
|
||||
CTemplate& o5 = Tmpl.AddRow("OptionLoop");
|
||||
o5["Name"] = "stripcontrols";
|
||||
o5["DisplayName"] = "Strip Controls";
|
||||
if (pChan && pChan->StripControls()) { o5["Checked"] = "true"; }
|
||||
|
||||
FOR_EACH_MODULE(i, pNetwork) {
|
||||
CTemplate& mod = Tmpl.AddRow("EmbeddedModuleLoop");
|
||||
mod.insert(Tmpl.begin(), Tmpl.end());
|
||||
@@ -734,11 +729,6 @@ public:
|
||||
else
|
||||
pChan->Enable();
|
||||
|
||||
bool bStripControls = WebSock.GetParam("stripcontrols").ToBool();
|
||||
if (pChan->StripControls() != bStripControls) {
|
||||
pChan->SetStripControls(bStripControls);
|
||||
}
|
||||
|
||||
CTemplate TmplMod;
|
||||
TmplMod["User"] = pUser->GetUserName();
|
||||
TmplMod["ChanName"] = pChan->GetName();
|
||||
@@ -845,7 +835,6 @@ public:
|
||||
|
||||
Tmpl["QuitMsg"] = pNetwork->GetQuitMsg();
|
||||
|
||||
Tmpl["StripControls"] = CString(pNetwork->StripControls());
|
||||
Tmpl["FloodProtection"] = CString(CIRCSock::IsFloodProtected(pNetwork->GetFloodRate()));
|
||||
Tmpl["FloodRate"] = CString(pNetwork->GetFloodRate());
|
||||
Tmpl["FloodBurst"] = CString(pNetwork->GetFloodBurst());
|
||||
@@ -1007,11 +996,6 @@ public:
|
||||
|
||||
pNetwork->SetJoinDelay(WebSock.GetParam("joindelay").ToUShort());
|
||||
|
||||
bool bStripControls = WebSock.GetParam("stripcontrols").ToBool();
|
||||
if (pNetwork->StripControls() != bStripControls) {
|
||||
pNetwork->SetStripControls(bStripControls);
|
||||
}
|
||||
|
||||
#ifdef HAVE_ICU
|
||||
CString sEncodingUtf = WebSock.GetParam("encoding_utf");
|
||||
if (sEncodingUtf == "legacy") {
|
||||
|
||||
Reference in New Issue
Block a user