mirror of
https://github.com/znc/znc.git
synced 2026-08-05 08:23:12 +02:00
Use the new CString constructor in various places to make them more readable
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1245 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -60,7 +60,7 @@ bool CChan::WriteConfig(CFile& File) {
|
||||
if (m_pUser->GetBufferCount() != GetBufferCount())
|
||||
File.Write("\t\tBuffer = " + CString(GetBufferCount()) + "\n");
|
||||
if (m_pUser->KeepBuffer() != KeepBuffer())
|
||||
File.Write("\t\tKeepBuffer = " + CString((KeepBuffer()) ? "true" : "false") + "\n");
|
||||
File.Write("\t\tKeepBuffer = " + CString(KeepBuffer()) + "\n");
|
||||
if (IsDetached())
|
||||
File.Write("\t\tDetached = true\n");
|
||||
if (!GetKey().empty()) { File.Write("\t\tKey = " + GetKey() + "\n"); }
|
||||
|
||||
@@ -575,16 +575,16 @@ bool CUser::WriteConfig(CFile& File) {
|
||||
PrintLine(File, "StatusPrefix", GetStatusPrefix());
|
||||
PrintLine(File, "ChanModes", GetDefaultChanModes());
|
||||
PrintLine(File, "Buffer", CString(GetBufferCount()));
|
||||
PrintLine(File, "KeepBuffer", CString((KeepBuffer()) ? "true" : "false"));
|
||||
PrintLine(File, "MultiClients", CString((MultiClients()) ? "true" : "false"));
|
||||
PrintLine(File, "BounceDCCs", CString((BounceDCCs()) ? "true" : "false"));
|
||||
PrintLine(File, "DenyLoadMod", CString((DenyLoadMod()) ? "true" : "false"));
|
||||
PrintLine(File, "Admin", CString((IsAdmin()) ? "true" : "false"));
|
||||
PrintLine(File, "DenySetVHost", CString((DenySetVHost()) ? "true" : "false"));
|
||||
PrintLine(File, "KeepBuffer", CString(KeepBuffer()));
|
||||
PrintLine(File, "MultiClients", CString(MultiClients()));
|
||||
PrintLine(File, "BounceDCCs", CString(BounceDCCs()));
|
||||
PrintLine(File, "DenyLoadMod", CString(DenyLoadMod()));
|
||||
PrintLine(File, "Admin", CString(IsAdmin()));
|
||||
PrintLine(File, "DenySetVHost", CString(DenySetVHost()));
|
||||
PrintLine(File, "DCCLookupMethod", CString((UseClientIP()) ? "client" : "default"));
|
||||
PrintLine(File, "TimestampFormat", GetTimestampFormat());
|
||||
PrintLine(File, "AppendTimestamp", CString((GetTimestampAppend()) ? "true" : "false"));
|
||||
PrintLine(File, "PrependTimestamp", CString((GetTimestampPrepend()) ? "true" : "false"));
|
||||
PrintLine(File, "AppendTimestamp", CString(GetTimestampAppend()));
|
||||
PrintLine(File, "PrependTimestamp", CString(GetTimestampPrepend()));
|
||||
PrintLine(File, "TimezoneOffset", CString(m_fTimezoneOffset));
|
||||
PrintLine(File, "JoinTries", CString(m_uMaxJoinTries));
|
||||
PrintLine(File, "MaxJoins", CString(m_uMaxJoins));
|
||||
|
||||
+6
-6
@@ -158,13 +158,13 @@ public:
|
||||
Table.SetCell("Value", "*****"); // m_sPassword
|
||||
Table.AddRow();
|
||||
Table.SetCell("Setting", "UseCloakedHost");
|
||||
Table.SetCell("Value", CString(m_bUseCloakedHost ? "true" : "false"));
|
||||
Table.SetCell("Value", CString(m_bUseCloakedHost));
|
||||
Table.AddRow();
|
||||
Table.SetCell("Setting", "UseChallenge");
|
||||
Table.SetCell("Value", CString(m_bUseChallenge ? "true" : "false"));
|
||||
Table.SetCell("Value", CString(m_bUseChallenge));
|
||||
Table.AddRow();
|
||||
Table.SetCell("Setting", "RequestPerms");
|
||||
Table.SetCell("Value", CString(m_bRequestPerms ? "true" : "false"));
|
||||
Table.SetCell("Value", CString(m_bRequestPerms));
|
||||
PutModule(Table);
|
||||
|
||||
} else if (sCommand == "status") {
|
||||
@@ -469,17 +469,17 @@ private:
|
||||
|
||||
void SetUseCloakedHost(const bool bUseCloakedHost) {
|
||||
m_bUseCloakedHost = bUseCloakedHost;
|
||||
SetNV("UseCloakedHost", CString(bUseCloakedHost ? "true" : "false"));
|
||||
SetNV("UseCloakedHost", CString(bUseCloakedHost));
|
||||
}
|
||||
|
||||
void SetUseChallenge(const bool bUseChallenge) {
|
||||
m_bUseChallenge = bUseChallenge;
|
||||
SetNV("UseChallenge", CString(bUseChallenge ? "true" : "false"));
|
||||
SetNV("UseChallenge", CString(bUseChallenge));
|
||||
}
|
||||
|
||||
void SetRequestPerms(const bool bRequestPerms) {
|
||||
m_bRequestPerms = bRequestPerms;
|
||||
SetNV("RequestPerms", CString(bRequestPerms ? "true" : "false"));
|
||||
SetNV("RequestPerms", CString(bRequestPerms));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user