1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 00:36:37 +02:00

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.
This commit is contained in:
Thomas Fargeix
2014-10-24 23:45:25 +02:00
parent b940077553
commit 2f004c2aab
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -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();
+6 -6
View File
@@ -351,6 +351,9 @@ class CommandOSSNLine : public CommandOSSXLineBase
if (mask[masklen - 1] == ' ')
mask.erase(masklen - 1);
if (Config->GetModule("operserv")->Get<bool>("addakiller", "yes") && !source.GetNick().empty())
reason = "[" + source.GetNick() + "] " + reason;
if (!this->xlm()->CanAdd(source, mask, expires, reason))
return;
else if (mask.find_first_not_of("/.*?") == Anope::string::npos)
@@ -359,9 +362,6 @@ class CommandOSSNLine : public CommandOSSXLineBase
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();
@@ -558,6 +558,9 @@ class CommandOSSQLine : public CommandOSSXLineBase
}
}
if (Config->GetModule("operserv")->Get<bool>("addakiller", "yes") && !source.GetNick().empty())
reason = "[" + source.GetNick() + "] " + reason;
if (!this->sqlines->CanAdd(source, mask, expires, reason))
return;
else if (mask.find_first_not_of("./?*") == Anope::string::npos)
@@ -566,9 +569,6 @@ class CommandOSSQLine : public CommandOSSXLineBase
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();