summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-01 22:06:43 -0400
committerAdam <Adam@anope.org>2017-07-12 18:57:35 -0400
commit1f3b7f2455b0d73d8874daff0459f4bde46b9524 (patch)
tree080405a80482e285b9923bbeb4571ec0ad18f0ba /src/coremods
parent35f7ac2a31ac31a2139939d78649a6faf4a185cc (diff)
cmd_kill: log all kills from or to remote users
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_oper/cmd_kill.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/coremods/core_oper/cmd_kill.cpp b/src/coremods/core_oper/cmd_kill.cpp
index 059f2cbc1..3e3a26ac7 100644
--- a/src/coremods/core_oper/cmd_kill.cpp
+++ b/src/coremods/core_oper/cmd_kill.cpp
@@ -96,6 +96,12 @@ CmdResult CommandKill::Handle (const std::vector<std::string>& parameters, User
if ((!ServerInstance->Config->HideULineKills) || (!user->server->IsULine()))
ServerInstance->SNO->WriteToSnoMask('K', "Remote kill by %s: %s (%s)", user->nick.c_str(), target->GetFullRealHost().c_str(), parameters[1].c_str());
this->lastuuid = target->uuid;
+
+ if (IS_LOCAL(user))
+ ServerInstance->Logs->Log("KILL", LOG_DEFAULT, "REMOTE KILL: %s :%s!%s!%s (%s)",
+ target->nick.c_str(),
+ ServerInstance->Config->ServerName.c_str(), user->dhost.c_str(), user->nick.c_str(),
+ parameters[1].c_str());
}
else
{
@@ -107,7 +113,11 @@ CmdResult CommandKill::Handle (const std::vector<std::string>& parameters, User
ServerInstance->SNO->WriteToSnoMask('K', "Remote kill by %s: %s (%s)", user->nick.c_str(), target->GetFullRealHost().c_str(), parameters[1].c_str());
}
- ServerInstance->Logs->Log("KILL", LOG_DEFAULT, "LOCAL KILL: %s :%s!%s!%s (%s)", target->nick.c_str(), ServerInstance->Config->ServerName.c_str(), user->dhost.c_str(), user->nick.c_str(), parameters[1].c_str());
+ ServerInstance->Logs->Log("KILL", LOG_DEFAULT, "%s KILL: %s :%s!%s!%s (%s)",
+ IS_LOCAL(user) ? "LOCAL" : "REMOTE",
+ target->nick.c_str(),
+ ServerInstance->Config->ServerName.c_str(), user->dhost.c_str(), user->nick.c_str(),
+ parameters[1].c_str());
target->Write(":%s KILL %s :%s",
ServerInstance->Config->HideKillsServer.empty() ? user->GetFullHost().c_str() : ServerInstance->Config->HideKillsServer.c_str(),