summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2015-12-13 19:59:29 -0500
committerAdam <Adam@anope.org>2015-12-13 19:59:29 -0500
commitb5228282e15883c1071c87edc303a924ea7d9c66 (patch)
tree254e853a1e12212097c5ec65fe1e505aad232b46 /modules
parent7ce0eb219b2f143833f6b157c5905855fb77e527 (diff)
parent593ec34ff70809189fbcb885be582ad334df0cb9 (diff)
Merge commit '593ec34' into 2.0
Diffstat (limited to 'modules')
-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)