flooddetach: make secs & lines commands rw

Improves the usability of the module.
This commit is contained in:
J-P Nurmi
2014-08-19 19:50:15 +02:00
parent e5e0bb356e
commit 44b10b5b97
+6 -2
View File
@@ -176,7 +176,9 @@ public:
void SecsCommand(const CString& sLine) {
const CString sArg = sLine.Token(1, true);
if (!sArg.empty()) {
if (sArg.empty()) {
PutModule("Seconds limit is [" + CString(m_iThresholdSecs) + "]");
} else {
m_iThresholdSecs = sArg.ToUInt();
if (m_iThresholdSecs == 0)
m_iThresholdSecs = 1;
@@ -189,7 +191,9 @@ public:
void LinesCommand(const CString& sLine) {
const CString sArg = sLine.Token(1, true);
if (!sArg.empty()) {
if (sArg.empty()) {
PutModule("Lines limit is [" + CString(m_iThresholdMsgs) + "]");
} else {
m_iThresholdMsgs = sArg.ToUInt();
if (m_iThresholdMsgs == 0)
m_iThresholdMsgs = 2;