summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/commands/os_akill.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp
index fc2558f2c..81c440ef3 100644
--- a/modules/commands/os_akill.cpp
+++ b/modules/commands/os_akill.cpp
@@ -156,9 +156,7 @@ class CommandOSAKill : public Command
if (Config->GetModule("operserv")->Get<bool>("addakiller", "yes") && !source.GetNick().empty())
reason = "[" + source.GetNick() + "] " + reason;
- if (!akills->CanAdd(source, mask, expires, reason))
- return;
- else if (mask.find_first_not_of("/~@.*?") == Anope::string::npos)
+ if (mask.find_first_not_of("/~@.*?") == Anope::string::npos)
{
source.Reply(USERHOST_MASK_TOO_WIDE, mask.c_str());
return;
@@ -187,6 +185,9 @@ class CommandOSAKill : public Command
return;
}
+ if (!akills->CanAdd(source, mask, expires, reason))
+ return;
+
EventReturn MOD_RESULT;
FOREACH_RESULT(OnAddXLine, MOD_RESULT, (source, x, akills));
if (MOD_RESULT == EVENT_STOP)