#include "main.h"
#include "commands.h"
-CmdResult CommandSVSNick::Handle(User* user, std::vector<std::string>& parameters)
+CmdResult CommandSVSNick::Handle(User* user, Params& parameters)
{
User* u = ServerInstance->FindNick(parameters[0]);
if (!u->ChangeNick(nick, NickTS))
{
- /* buh. UID them */
+ // Changing to 'nick' failed (it may already be in use), change to the uuid
u->ChangeNick(u->uuid);
}
}
return CMD_SUCCESS;
}
-RouteDescriptor CommandSVSNick::GetRouting(User* user, const std::vector<std::string>& parameters)
+RouteDescriptor CommandSVSNick::GetRouting(User* user, const Params& parameters)
{
- User* u = ServerInstance->FindNick(parameters[0]);
- if (u)
- return ROUTE_OPT_UCAST(u->server);
- return ROUTE_LOCALONLY;
+ return ROUTE_OPT_UCAST(parameters[0]);
}