1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 06:36:41 +02:00

os_akill: Sanity check AKILLing before modifing the akill list

This commit is contained in:
Matt Ullman
2015-07-28 18:44:22 -04:00
committed by Adam
parent dfc18db1dd
commit 593ec34ff7
+4 -3
View File
@@ -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)