mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
admindebug: language/style fixes
This commit is contained in:
@@ -36,7 +36,7 @@ class CAdminDebugMod : public CModule {
|
||||
}
|
||||
|
||||
void CommandEnable(const CString& sCommand) {
|
||||
if (GetUser()->IsAdmin() == false) {
|
||||
if (!GetUser()->IsAdmin()) {
|
||||
PutModule(t_s("Access denied!"));
|
||||
return;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class CAdminDebugMod : public CModule {
|
||||
}
|
||||
|
||||
void CommandDisable(const CString& sCommand) {
|
||||
if (GetUser()->IsAdmin() == false) {
|
||||
if (!GetUser()->IsAdmin()) {
|
||||
PutModule(t_s("Access denied!"));
|
||||
return;
|
||||
}
|
||||
@@ -53,7 +53,7 @@ class CAdminDebugMod : public CModule {
|
||||
ToggleDebug(false, m_sEnabledBy);
|
||||
}
|
||||
|
||||
bool ToggleDebug(bool bEnable, CString sEnabledBy) {
|
||||
bool ToggleDebug(bool bEnable, const CString& sEnabledBy) {
|
||||
if (!CDebug::StdoutIsTTY()) {
|
||||
PutModule(t_s("Failure. We need to be running with a TTY. (is ZNC running with --foreground?)"));
|
||||
return false;
|
||||
@@ -71,15 +71,14 @@ class CAdminDebugMod : public CModule {
|
||||
}
|
||||
|
||||
CDebug::SetDebug(bEnable);
|
||||
CString sEnabled = CString(bEnable ? "on" : "off");
|
||||
CZNC::Get().Broadcast(CString(
|
||||
"An administrator has just turned Debug Mode \02" + sEnabled + "\02. It was enabled by \02" + sEnabledBy + "\02."
|
||||
));
|
||||
CString sEnabled = bEnable ? "on" : "off";
|
||||
CZNC::Get().Broadcast(
|
||||
"An administrator has just turned Debug Mode \02" + sEnabled +
|
||||
"\02. It was enabled by \02" + sEnabledBy + "\02.");
|
||||
if (bEnable) {
|
||||
CZNC::Get().Broadcast(
|
||||
CString("Messages, credentials, and other sensitive data may"
|
||||
" become exposed to the host during this period.")
|
||||
);
|
||||
"Messages, credentials, and other sensitive data may become "
|
||||
"exposed to the host during this period.");
|
||||
m_sEnabledBy = sEnabledBy;
|
||||
} else {
|
||||
m_sEnabledBy = "";
|
||||
|
||||
Reference in New Issue
Block a user