summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_sanick.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index 0ce9338a4..9f967bb0b 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -47,17 +47,18 @@ class cmd_sanick : public command_t
user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick);
return CMD_FAILURE;
}
+ std::string oldnick = user->nick;
if (ServerInstance->IsNick(parameters[1]))
{
if (source->ForceNickChange(parameters[1]))
{
- ServerInstance->WriteOpers(std::string(user->nick)+" used SANICK to change "+std::string(parameters[0])+" to "+parameters[1]);
+ ServerInstance->WriteOpers(oldnick+" used SANICK to change "+std::string(parameters[0])+" to "+parameters[1]);
return CMD_SUCCESS;
}
else
{
/* We couldnt change the nick */
- ServerInstance->WriteOpers(std::string(user->nick)+" failed SANICK (from "+std::string(parameters[0])+" to "+parameters[1]+")");
+ ServerInstance->WriteOpers(oldnick+" failed SANICK (from "+std::string(parameters[0])+" to "+parameters[1]+")");
return CMD_FAILURE;
}
}