summaryrefslogtreecommitdiff
path: root/modules/commands/cs_ban.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-09-21 11:21:38 -0400
committerAdam <Adam@anope.org>2013-09-27 19:11:02 -0400
commitdf3c0b7b52066698a97b34edf5352cf344e991ac (patch)
treefb3f2384e8863e9fcb86581ed56516b4c2233b48 /modules/commands/cs_ban.cpp
parent45702992ac8c0d36bd0a7eba1580d9cf8a364d74 (diff)
Fix various commands to properly report a given expiry time is invalid
Diffstat (limited to 'modules/commands/cs_ban.cpp')
-rw-r--r--modules/commands/cs_ban.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp
index 8d1c05336..bb41658de 100644
--- a/modules/commands/cs_ban.cpp
+++ b/modules/commands/cs_ban.cpp
@@ -69,6 +69,11 @@ class CommandCSBan : public Command
if (params[1][0] == '+')
{
ban_time = Anope::DoTime(params[1]);
+ if (ban_time == -1)
+ {
+ source.Reply(BAD_EXPIRY_TIME);
+ return;
+ }
if (params.size() < 3)
{
this->SendSyntax(source);