From f0c0160ca6b68092f4d26beedc3bf8785e2ff234 Mon Sep 17 00:00:00 2001 From: Matt Ullman Date: Wed, 28 Sep 2016 19:23:51 -0400 Subject: os_akill: Sanity check AKILLing before modifing the akill list --- modules/operserv/akill.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') 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("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(); x->SetMask(mask); x->SetBy(source.GetNick()); -- cgit