From 7a1d2e11ddb27c5bb646ba498acf32c307693014 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 3 Jul 2016 13:31:12 -0400 Subject: [PATCH] chankill: don't add duplicate akills --- modules/commands/os_chankill.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/commands/os_chankill.cpp b/modules/commands/os_chankill.cpp index 48ad2a865..56b5f6b33 100644 --- a/modules/commands/os_chankill.cpp +++ b/modules/commands/os_chankill.cpp @@ -76,7 +76,11 @@ class CommandOSChanKill : public Command if (uc->user->server == Me || uc->user->HasMode("OPER")) continue; - XLine *x = new XLine("*@" + uc->user->host, source.GetNick(), expires, realreason, XLineManager::GenerateUID()); + Anope::string akillmask = "*@" + uc->user->host; + if (akills->HasEntry(akillmask)) + continue; + + XLine *x = new XLine(akillmask, source.GetNick(), expires, realreason, XLineManager::GenerateUID()); akills->AddXLine(x); akills->OnMatch(uc->user, x); }