From 33b0f56fdeabca9add41a449bc250ea6ea67bf7d Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 8 Sep 2006 22:13:03 +0000 Subject: Fix output when user SANICKs themselves git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5175 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_sanick.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/modules') 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; } } -- cgit v1.2.3