diff options
author | Thomas Fargeix <t.fargeix@gmail.com> | 2014-10-24 23:45:25 +0200 |
---|---|---|
committer | Thomas Fargeix <t.fargeix@gmail.com> | 2014-10-24 23:49:02 +0200 |
commit | 2f004c2aab8eb33afd958b7dfe05cd89703a1129 (patch) | |
tree | 72863142cf19c263e3144668fb767097435dfa51 /modules/commands/os_akill.cpp | |
parent | b940077553a538a14519bd11207c96bfd7b5ae4e (diff) |
Keep the akiller's name when updating the reason.
The name of the oper issuing an akill or a sxline could be removed by updating the reason,
even though addkiller was enabled.
Diffstat (limited to 'modules/commands/os_akill.cpp')
-rw-r--r-- | modules/commands/os_akill.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp index af8573752..fc2558f2c 100644 --- a/modules/commands/os_akill.cpp +++ b/modules/commands/os_akill.cpp @@ -153,6 +153,9 @@ class CommandOSAKill : public Command if (targ) mask = "*@" + targ->host; + 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) @@ -166,9 +169,6 @@ class CommandOSAKill : public Command return; } - if (Config->GetModule("operserv")->Get<bool>("addakiller", "yes") && !source.GetNick().empty()) - reason = "[" + source.GetNick() + "] " + reason; - XLine *x = new XLine(mask, source.GetNick(), expires, reason); if (Config->GetModule("operserv")->Get<bool>("akillids")) x->id = XLineManager::GenerateUID(); |