From c71361e8e4f22cb4f72881399bce2832eb080b0e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 24 Nov 2020 16:28:02 +0000 Subject: Fix some confusing logic in sanick. --- src/modules/m_sanick.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 5255d31b8..724553e3c 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -67,15 +67,15 @@ class CommandSanick : public Command /* Have we hit target's server yet? */ if (target && IS_LOCAL(target)) { - std::string oldnick = user->nick; - std::string newnick = target->nick; - if (target->ChangeNick(parameters[1])) + const std::string oldnick = target->nick; + const std::string newnick = parameters[1]; + if (target->ChangeNick(newnick)) { - ServerInstance->SNO->WriteGlobalSno('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]); + ServerInstance->SNO->WriteGlobalSno('a', user->nick + " used SANICK to change " + oldnick + " to " + newnick); } else { - ServerInstance->SNO->WriteGlobalSno('a', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")"); + ServerInstance->SNO->WriteGlobalSno('a', user->nick + " failed SANICK (from " + oldnick + " to " + newnick + ")"); } } -- cgit v1.2.3