diff options
Diffstat (limited to 'src/modules/m_sanick.cpp')
-rw-r--r-- | src/modules/m_sanick.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index ca6be2211..c9ceba78e 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -29,7 +29,7 @@ class CommandSanick : public Command CommandSanick(Module* Creator) : Command(Creator,"SANICK", 2) { allow_empty_last_param = false; - flags_needed = 'o'; Penalty = 0; syntax = "<nick> <new-nick>"; + flags_needed = 'o'; syntax = "<nick> <new-nick>"; TRANSLATE2(TR_NICK, TR_TEXT); } @@ -42,7 +42,7 @@ class CommandSanick : public Command { if (target && target->server->IsULine()) { - user->WriteNumeric(ERR_NOPRIVILEGES, ":Cannot use an SA command on a u-lined client"); + user->WriteNumeric(ERR_NOPRIVILEGES, "Cannot use an SA command on a u-lined client"); return CMD_FAILURE; } @@ -64,7 +64,7 @@ class CommandSanick : public Command { std::string oldnick = user->nick; std::string newnick = target->nick; - if (target->ChangeNick(parameters[1], true)) + if (target->ChangeNick(parameters[1])) { ServerInstance->SNO->WriteGlobalSno('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]); } @@ -79,10 +79,7 @@ class CommandSanick : public Command RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { - User* dest = ServerInstance->FindNick(parameters[0]); - if (dest) - return ROUTE_OPT_UCAST(dest->server); - return ROUTE_LOCALONLY; + return ROUTE_OPT_UCAST(parameters[0]); } }; |