summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ullman <matt@airraidsirens.com>2016-09-28 19:23:51 -0400
committerAdam <Adam@anope.org>2016-09-28 19:23:51 -0400
commitf0c0160ca6b68092f4d26beedc3bf8785e2ff234 (patch)
tree3a397b1e4e9857bd8334a414097a3f7bc6c96de8
parentc6153a8bd8c5d86e9d0eca1877e6ea8ab1eca9c1 (diff)
os_akill: Sanity check AKILLing before modifing the akill list
-rw-r--r--modules/operserv/akill.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/operserv/akill.cpp b/modules/operserv/akill.cpp
index 7e2f0bdf0..9a6a7b271 100644
--- a/modules/operserv/akill.cpp
+++ b/modules/operserv/akill.cpp
@@ -112,9 +112,6 @@ 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;
-
if (mask.find_first_not_of("/~@.*?") == Anope::string::npos)
{
source.Reply(_("\002{0}\002 coverage is too wide; Please use a more specific mask."), mask);
@@ -127,6 +124,9 @@ class CommandOSAKill : public Command
return;
}
+ if (!akills->CanAdd(source, mask, expires, reason))
+ return;
+
XLine *x = Serialize::New<XLine *>();
x->SetMask(mask);
x->SetBy(source.GetNick());