diff options
author | Adam <Adam@anope.org> | 2016-10-06 13:50:39 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-10-06 13:50:39 -0400 |
commit | 8d7c21da074f379eedffabd04d1a9c3516280d9e (patch) | |
tree | d2c70e7a578c515cea33709aea0b74088ec6bbc2 | |
parent | 83f19e597f9c8c678ad6c69697491842554b38d6 (diff) |
Clarify botserv repeat kicker message and allow setting repeat times to 1
-rw-r--r-- | modules/botserv/kick.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
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<int16_t>(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")) { |