}\r
\r
void CommandEnable(const CString& sCommand) {\r
- if (GetUser()->IsAdmin() == false) {\r
+ if (!GetUser()->IsAdmin()) {\r
PutModule(t_s("Access denied!"));\r
return;\r
}\r
}\r
\r
void CommandDisable(const CString& sCommand) {\r
- if (GetUser()->IsAdmin() == false) {\r
+ if (!GetUser()->IsAdmin()) {\r
PutModule(t_s("Access denied!"));\r
return;\r
}\r
ToggleDebug(false, m_sEnabledBy);\r
}\r
\r
- bool ToggleDebug(bool bEnable, CString sEnabledBy) {\r
+ bool ToggleDebug(bool bEnable, const CString& sEnabledBy) {\r
if (!CDebug::StdoutIsTTY()) {\r
PutModule(t_s("Failure. We need to be running with a TTY. (is ZNC running with --foreground?)"));\r
return false;\r
}\r
\r
CDebug::SetDebug(bEnable);\r
- CString sEnabled = CString(bEnable ? "on" : "off");\r
- CZNC::Get().Broadcast(CString(\r
- "An administrator has just turned Debug Mode \02" + sEnabled + "\02. It was enabled by \02" + sEnabledBy + "\02."\r
- ));\r
+ CString sEnabled = bEnable ? "on" : "off";\r
+ CZNC::Get().Broadcast(\r
+ "An administrator has just turned Debug Mode \02" + sEnabled +\r
+ "\02. It was enabled by \02" + sEnabledBy + "\02.");\r
if (bEnable) {\r
CZNC::Get().Broadcast(\r
- CString("Messages, credentials, and other sensitive data may"\r
- " become exposed to the host during this period.")\r
- );\r
+ "Messages, credentials, and other sensitive data may become "\r
+ "exposed to the host during this period.");\r
m_sEnabledBy = sEnabledBy;\r
} else {\r
m_sEnabledBy = "";\r