summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-06 14:46:16 -0400
committerAdam <Adam@anope.org>2016-10-06 14:46:16 -0400
commitd3ac74a575dfc31bcfb15af1ce1e4cc4c30bda3e (patch)
tree80ea62c55d115ac8eca6d7ed2ca3964d2f0f944f
parent7a5c4e55991a8b884c1a2f4b00fd2e6f5297c0d6 (diff)
chankill: don't add duplicate akills
-rw-r--r--modules/operserv/chankill.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/operserv/chankill.cpp b/modules/operserv/chankill.cpp
index ab2a7adad..9ab820821 100644
--- a/modules/operserv/chankill.cpp
+++ b/modules/operserv/chankill.cpp
@@ -93,8 +93,13 @@ class CommandOSChanKill : public Command
if (uc->user->server == Me || uc->user->HasMode("OPER"))
continue;
+ Anope::string akillmask = "*@" + uc->user->host;
+
+ if (akills->HasEntry(akillmask))
+ continue;
+
XLine *x = Serialize::New<XLine *>();
- x->SetMask("*@" + uc->user->host);
+ x->SetMask(akillmask);
x->SetBy(source.GetNick());
x->SetExpires(expires);
x->SetReason(realreason);