summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-06 13:50:39 -0400
committerAdam <Adam@anope.org>2016-10-06 13:50:39 -0400
commit8d7c21da074f379eedffabd04d1a9c3516280d9e (patch)
treed2c70e7a578c515cea33709aea0b74088ec6bbc2
parent83f19e597f9c8c678ad6c69697491842554b38d6 (diff)
Clarify botserv repeat kicker message and allow setting repeat times to 1
-rw-r--r--modules/botserv/kick.cpp19
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"))
{