From 8d7c21da074f379eedffabd04d1a9c3516280d9e Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 6 Oct 2016 13:50:39 -0400 Subject: Clarify botserv repeat kicker message and allow setting repeat times to 1 --- modules/botserv/kick.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'modules/botserv') diff --git a/modules/botserv/kick.cpp b/modules/botserv/kick.cpp index 65096e644..3d56ddd21 100644 --- a/modules/botserv/kick.cpp +++ b/modules/botserv/kick.cpp @@ -969,13 +969,26 @@ class CommandBSKickRepeat : public CommandBSKickBase kd->SetRepeatTimes(convertTo(times)); } catch (const ConvertException &) { } - if (kd->GetRepeatTimes() < 2) + if (kd->GetRepeatTimes() < 1) kd->SetRepeatTimes(3); if (i) - source.Reply(_("Bot will now kick for \002repeats\002 (users that say the same thing {0} times), and will place a ban after {1} kicks for the same user."), kd->GetRepeatTimes(), i); + { + if (kd->GetRepeatTimes() != 1) + source.Reply(_("Bot will now kick for \002repeats\002 (users that say the same thing {0} times)," + " and will place a ban after {1} kicks for the same user."), kd->GetRepeatTimes(), i); + else + source.Reply(_("Bot will now kick for \002repeats\002 (users that say the same thing {0} time)," + " and will place a ban after {1} kicks for the same user."), kd->GetRepeatTimes(), i); + } else - source.Reply(_("Bot will now kick for \002repeats\002 (users that say the same thing {0} times)."), kd->GetRepeatTimes() + 1); + { + if (kd->GetRepeatTimes() != 1) + source.Reply(_("Bot will now kick for \002repeats\002 (users that say the same thing {0} times)."), kd->GetRepeatTimes()); + else + source.Reply(_("Bot will now kick for \002repeats\002 (users that say the same thing {0} time)."), kd->GetRepeatTimes()); + + } } else if (params[1].equals_ci("OFF")) { -- cgit