From 44b10b5b975161d8ce83a09225487c4c85af7926 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 19 Aug 2014 19:50:15 +0200 Subject: [PATCH] flooddetach: make secs & lines commands rw Improves the usability of the module. --- modules/flooddetach.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/flooddetach.cpp b/modules/flooddetach.cpp index 831f7b11..72720264 100644 --- a/modules/flooddetach.cpp +++ b/modules/flooddetach.cpp @@ -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;