Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Argh, commited wrong stuff...

  • Loading branch information...
commit b496b282b290976ce8a5a8aa9aa0ad1b1221defe 1 parent 87a79f8
@DarthGandalf DarthGandalf authored
Showing with 6 additions and 26 deletions.
  1. +6 −26 modules/webadmin.cpp
View
32 modules/webadmin.cpp
@@ -53,26 +53,6 @@ inline bool FOR_EACH_MODULE_CanContinue(FOR_EACH_MODULE_Type& state, CModules::i
if (FOR_EACH_MODULE_Type FOR_EACH_MODULE_Var = pUser) {} else\
for (CModules::iterator I = CZNC::Get().GetModules().begin(); FOR_EACH_MODULE_CanContinue(FOR_EACH_MODULE_Var, I); ++I)
-inline CString EscapeColors(const CString& s) {
- CString result = _NAMEDFMT(s);
- result.Replace("\x02", "{bold}");
- result.Replace("\x03", "{color}");
- result.Replace("\x0f", "{clear}");
- result.Replace("\x16", "{reverse}");
- result.Replace("\x1f", "{underline}");
- return result;
-}
-
-inline CString UnescapeColors(const CString& s) {
- MCString codes;
- codes["bold"] = "\x02";
- codes["color"] = "\x03";
- codes["clear"] = "\x0f";
- codes["reverse"] = "\x16";
- codes["underline"] = "\x1f";
- return CString::NamedFormat(s, codes);
-}
-
class CWebAdminMod : public CModule {
public:
MODCONSTRUCTOR(CWebAdminMod) {
@@ -221,8 +201,8 @@ class CWebAdminMod : public CModule {
sArg = WebSock.GetParam("statusprefix"); if (!sArg.empty()) { pNewUser->SetStatusPrefix(sArg); }
sArg = WebSock.GetParam("ident"); if (!sArg.empty()) { pNewUser->SetIdent(sArg); }
sArg = WebSock.GetParam("skin"); if (!sArg.empty()) { pNewUser->SetSkinName(sArg); }
- sArg = WebSock.GetParam("realname"); if (!sArg.empty()) { pNewUser->SetRealName(UnescapeColors(sArg)); }
- sArg = WebSock.GetParam("quitmsg"); if (!sArg.empty()) { pNewUser->SetQuitMsg(UnescapeColors(sArg)); }
+ sArg = WebSock.GetParam("realname"); if (!sArg.empty()) { pNewUser->SetRealName(sArg); }
+ sArg = WebSock.GetParam("quitmsg"); if (!sArg.empty()) { pNewUser->SetQuitMsg(sArg); }
sArg = WebSock.GetParam("chanmodes"); if (!sArg.empty()) { pNewUser->SetDefaultChanModes(sArg); }
sArg = WebSock.GetParam("timestampformat"); if (!sArg.empty()) { pNewUser->SetTimestampFormat(sArg); }
@@ -712,7 +692,7 @@ class CWebAdminMod : public CModule {
Tmpl["Nick"] = pNetwork->GetNick();
Tmpl["AltNick"] = pNetwork->GetAltNick();
Tmpl["Ident"] = pNetwork->GetIdent();
- Tmpl["RealName"] = EscapeColors(pNetwork->GetRealName());
+ Tmpl["RealName"] = pNetwork->GetRealName();
Tmpl["FloodProtection"] = CString(CIRCSock::IsFloodProtected(pNetwork->GetFloodRate()));
Tmpl["FloodRate"] = CString(pNetwork->GetFloodRate());
@@ -782,7 +762,7 @@ class CWebAdminMod : public CModule {
pNetwork->SetNick(WebSock.GetParam("nick"));
pNetwork->SetAltNick(WebSock.GetParam("altnick"));
pNetwork->SetIdent(WebSock.GetParam("ident"));
- pNetwork->SetRealName(UnescapeColors(WebSock.GetParam("realname")));
+ pNetwork->SetRealName(WebSock.GetParam("realname"));
pNetwork->SetIRCConnectEnabled(WebSock.GetParam("doconnect").ToBool());
@@ -949,8 +929,8 @@ class CWebAdminMod : public CModule {
Tmpl["AltNick"] = pUser->GetAltNick();
Tmpl["StatusPrefix"] = pUser->GetStatusPrefix();
Tmpl["Ident"] = pUser->GetIdent();
- Tmpl["RealName"] = EscapeColors(pUser->GetRealName());
- Tmpl["QuitMsg"] = EscapeColors(pUser->GetQuitMsg());
+ Tmpl["RealName"] = pUser->GetRealName();
+ Tmpl["QuitMsg"] = pUser->GetQuitMsg();
Tmpl["DefaultChanModes"] = pUser->GetDefaultChanModes();
Tmpl["BufferCount"] = CString(pUser->GetBufferCount());
Tmpl["TimestampFormat"] = pUser->GetTimestampFormat();
Please sign in to comment.
Something went wrong with that request. Please try again.