From 0b0ef772755c265ef1fb5f9d9de3fdf9d50473e4 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 1 Oct 2016 21:55:55 -0400 Subject: [PATCH] cmd_kill: rename u to target --- src/coremods/core_oper/cmd_kill.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/coremods/core_oper/cmd_kill.cpp b/src/coremods/core_oper/cmd_kill.cpp index f024f6b0d..c331d8ccd 100644 --- a/src/coremods/core_oper/cmd_kill.cpp +++ b/src/coremods/core_oper/cmd_kill.cpp @@ -43,8 +43,8 @@ CmdResult CommandKill::Handle (const std::vector& parameters, User return CMD_FAILURE; } - User *u = ServerInstance->FindNick(parameters[0]); - if (!u) + User* target = ServerInstance->FindNick(parameters[0]); + if (!target) { user->WriteNumeric(Numerics::NoSuchNick(parameters[0])); return CMD_FAILURE; @@ -65,7 +65,7 @@ CmdResult CommandKill::Handle (const std::vector& parameters, User * and the other half not. This would be a bad thing. ;p -- w00t */ ModResult MOD_RESULT; - FIRST_MOD_RESULT(OnKill, MOD_RESULT, (user, u, parameters[1])); + FIRST_MOD_RESULT(OnKill, MOD_RESULT, (user, target, parameters[1])); if (MOD_RESULT == MOD_RES_DENY) return CMD_FAILURE; @@ -94,12 +94,12 @@ CmdResult CommandKill::Handle (const std::vector& parameters, User * Now we need to decide whether or not to send a local or remote snotice. Currently this checking is a little flawed. * No time to fix it right now, so left a note. -- w00t */ - if (!IS_LOCAL(u)) + if (!IS_LOCAL(target)) { // remote kill if ((!ServerInstance->Config->HideULineKills) || (!user->server->IsULine())) - ServerInstance->SNO->WriteToSnoMask('K', "Remote kill by %s: %s (%s)", user->nick.c_str(), u->GetFullRealHost().c_str(), parameters[1].c_str()); - this->lastuuid = u->uuid; + 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; } else { @@ -111,23 +111,23 @@ CmdResult CommandKill::Handle (const std::vector& parameters, User if ((!ServerInstance->Config->HideULineKills) || (!user->server->IsULine())) { if (IS_LOCAL(user)) - ServerInstance->SNO->WriteGlobalSno('k',"Local Kill by %s: %s (%s)", user->nick.c_str(), u->GetFullRealHost().c_str(), parameters[1].c_str()); + ServerInstance->SNO->WriteGlobalSno('k',"Local Kill by %s: %s (%s)", user->nick.c_str(), target->GetFullRealHost().c_str(), parameters[1].c_str()); else - ServerInstance->SNO->WriteToSnoMask('k',"Local Kill by %s: %s (%s)", user->nick.c_str(), u->GetFullRealHost().c_str(), parameters[1].c_str()); + ServerInstance->SNO->WriteToSnoMask('k',"Local 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)", u->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, "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()); - u->Write(":%s KILL %s :%s", + target->Write(":%s KILL %s :%s", ServerInstance->Config->HideKillsServer.empty() ? user->GetFullHost().c_str() : ServerInstance->Config->HideKillsServer.c_str(), - u->nick.c_str(), + target->nick.c_str(), parameters[1].c_str()); this->lastuuid.clear(); } // send the quit out - ServerInstance->Users->QuitUser(u, killreason); + ServerInstance->Users->QuitUser(target, killreason); return CMD_SUCCESS; } -- 2.39.5