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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user