diff options
author | Adam <Adam@anope.org> | 2013-09-21 11:21:38 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-09-27 19:11:02 -0400 |
commit | df3c0b7b52066698a97b34edf5352cf344e991ac (patch) | |
tree | fb3f2384e8863e9fcb86581ed56516b4c2233b48 /modules/commands/os_forbid.cpp | |
parent | 45702992ac8c0d36bd0a7eba1580d9cf8a364d74 (diff) |
Fix various commands to properly report a given expiry time is invalid
Diffstat (limited to 'modules/commands/os_forbid.cpp')
-rw-r--r-- | modules/commands/os_forbid.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index ec498a3ba..1cec143e9 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -137,7 +137,12 @@ class CommandOSForbid : public Command if (!expiry.empty()) { expiryt = Anope::DoTime(expiry); - if (expiryt) + if (expiryt == -1) + { + source.Reply(BAD_EXPIRY_TIME); + return; + } + else if (expiryt) expiryt += Anope::CurTime; } |