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:
psychon
2008-10-10 17:58:36 +00:00
parent 88a993a63a
commit 0a4e4a10a6
3 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -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"); }
+8 -8
View File
@@ -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
View File
@@ -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));
}
};