From 7fb358e0dfa8b8bf9d93039802147127eeaf96f3 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 12 Aug 2015 02:00:59 +0200 Subject: [PATCH] fail2ban: fix command help syntax (#534) --- modules/fail2ban.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/fail2ban.cpp b/modules/fail2ban.cpp index c0ea64d0..ee10c048 100644 --- a/modules/fail2ban.cpp +++ b/modules/fail2ban.cpp @@ -20,8 +20,8 @@ class CFailToBanMod : public CModule { public: MODCONSTRUCTOR(CFailToBanMod) { AddHelpCommand(); - AddCommand("Timeout", static_cast(&CFailToBanMod::OnTimeoutCommand), "()", "The number of minutes IPs are blocked after a failed login."); - AddCommand("Attempts", static_cast(&CFailToBanMod::OnAttemptsCommand), "()", "The number of allowed failed login attempts."); + AddCommand("Timeout", static_cast(&CFailToBanMod::OnTimeoutCommand), "[minutes]", "The number of minutes IPs are blocked after a failed login."); + AddCommand("Attempts", static_cast(&CFailToBanMod::OnAttemptsCommand), "[count]", "The number of allowed failed login attempts."); AddCommand("Ban", static_cast(&CFailToBanMod::OnBanCommand), "", "Ban the specified hosts."); AddCommand("Unban", static_cast(&CFailToBanMod::OnUnbanCommand), "", "Unban the specified hosts."); AddCommand("List", static_cast(&CFailToBanMod::OnListCommand), "", "List banned hosts."); @@ -71,7 +71,7 @@ public: if (!sArg.empty()) { unsigned int uTimeout = sArg.ToUInt(); if (uTimeout == 0) { - PutModule("Usage: Timeout ()"); + PutModule("Usage: Timeout [minutes]"); } else { m_Cache.SetTTL(uTimeout * 60 * 1000); SetArgs(CString(m_Cache.GetTTL() / 60 / 1000) + " " + CString(m_uiAllowedFailed)); @@ -88,7 +88,7 @@ public: if (!sArg.empty()) { unsigned int uiAttempts = sArg.ToUInt(); if (uiAttempts == 0) { - PutModule("Usage: Attempts ()"); + PutModule("Usage: Attempts [count]"); } else { m_uiAllowedFailed = uiAttempts; SetArgs(CString(m_Cache.GetTTL() / 60 / 1000) + " " + CString(m_uiAllowedFailed));