summaryrefslogtreecommitdiff
path: root/src/modules/m_sanick.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-08 22:13:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-08 22:13:03 +0000
commit33b0f56fdeabca9add41a449bc250ea6ea67bf7d (patch)
tree81e9e166d32c0c6079905f691da61f8d558c9704 /src/modules/m_sanick.cpp
parentea052207d2657fbf9955c1b7121b76dea9df38ae (diff)
Fix output when user SANICKs themselves
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5175 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sanick.cpp')
-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;
}
}