summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-07-03 13:31:12 -0400
committerAdam <Adam@anope.org>2016-07-03 13:31:12 -0400
commit7a1d2e11ddb27c5bb646ba498acf32c307693014 (patch)
tree5e67213864a12129fd01e0b0ed46d9a96c3d20e9
parent8dc687b657205abefeb1a779ea42070721252e14 (diff)
chankill: don't add duplicate akills
-rw-r--r--modules/commands/os_chankill.cpp6
1 files changed, 5 insertions, 1 deletions
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);
}