summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-06-25 13:04:32 -0400
committerAdam <Adam@anope.org>2016-06-25 13:04:32 -0400
commit83f89bfece81e14c93584370556b0f5751d25f44 (patch)
treed3fe12422985fdc9e4e759b79ad1e10a9bffe428
parent7cf42453592b845aa946af7313395deb998abee0 (diff)
Clarify botserv repeat kicker message and allow setting repeat times to 1
-rw-r--r--modules/commands/bs_kick.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp
index 8e89a42e0..1897bc5e6 100644
--- a/modules/commands/bs_kick.cpp
+++ b/modules/commands/bs_kick.cpp
@@ -663,17 +663,30 @@ class CommandBSKickRepeat : public CommandBSKickBase
kd->repeattimes = convertTo<int16_t>(times);
}
catch (const ConvertException &) { }
- if (kd->repeattimes < 2)
+ if (kd->repeattimes < 1)
kd->repeattimes = 3;
kd->repeat = true;
if (kd->ttb[TTB_REPEAT])
- source.Reply(_("Bot will now kick for \002repeats\002 (users that say the\n"
- "same thing %d times), and will place a ban after %d\n"
- "kicks for the same user."), kd->repeattimes + 1, kd->ttb[TTB_REPEAT]);
+ {
+ if (kd->repeattimes != 1)
+ source.Reply(_("Bot will now kick for \002repeats\002 (users that repeat the\n"
+ "same message %d times), and will place a ban after %d\n"
+ "kicks for the same user."), kd->repeattimes, kd->ttb[TTB_REPEAT]);
+ else
+ source.Reply(_("Bot will now kick for \002repeats\002 (users that repeat the\n"
+ "same message %d time), and will place a ban after %d\n"
+ "kicks for the same user."), kd->repeattimes, kd->ttb[TTB_REPEAT]);
+ }
else
- source.Reply(_("Bot will now kick for \002repeats\002 (users that say the\n"
- "same thing %d times)."), kd->repeattimes + 1);
+ {
+ if (kd->repeattimes != 1)
+ source.Reply(_("Bot will now kick for \002repeats\002 (users that repeat the\n"
+ "same message %d times)."), kd->repeattimes);
+ else
+ source.Reply(_("Bot will now kick for \002repeats\002 (users that repeat the\n"
+ "same message %d time)."), kd->repeattimes);
+ }
}
else if (params[1].equals_ci("OFF"))
{