Use CString::ToBool for the argument to ReplayAll
This commit is contained in:
parent
a249f23c7b
commit
43e34bd202
@ -47,20 +47,14 @@ public:
|
|||||||
void ReplayAllCommand(const CString &sLine) {
|
void ReplayAllCommand(const CString &sLine) {
|
||||||
CString sArgs = sLine.Token(1, true);
|
CString sArgs = sLine.Token(1, true);
|
||||||
|
|
||||||
if (sArgs.empty()) {
|
if (!sArgs.empty()) {
|
||||||
CString status = (replayAll ? "On" : "Off");
|
replayAll = sArgs.ToBool();
|
||||||
PutModule("ReplayAll is set to: "+status);
|
SetSetting("replayAll", replayAll ? "1" : "0");
|
||||||
} else {
|
|
||||||
if (sArgs.Equals("ON") || sArgs.Equals("1") || sArgs.Equals("true")) {
|
|
||||||
replayAll = true;
|
|
||||||
SetSetting("replayAll", "1");
|
|
||||||
} else {
|
|
||||||
replayAll = false;
|
|
||||||
SetSetting("replayAll", "0");
|
|
||||||
}
|
|
||||||
CString status = (replayAll ? "On" : "Off");
|
|
||||||
PutModule("ReplayAll is now set to: "+status);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CString status = (replayAll ? "On" : "Off");
|
||||||
|
CString sNow = (sArgs.empty() ? "" : "now ");
|
||||||
|
PutModule("ReplayAll is " + sNow + "set to: "+ status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogLimitCommand(const CString &sLine) {
|
void LogLimitCommand(const CString &sLine) {
|
||||||
|
Loading…
Reference in New Issue
Block a user