TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
- CmdResult Handle(const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle(const std::vector<std::string>& parameters, User *user)
{
User* target = ServerInstance->FindNick(parameters[0]);
irc::string server;
}
// check nick is valid
- if (!ServerInstance->IsNick(parameters[1]))
+ if (!ServerInstance->IsNick(parameters[1].c_str()))
{
return CMD_FAILURE;
}
// let others know
ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used NICKLOCK to change and hold "+parameters[0]+" to "+parameters[1]);
- if (!target->ForceNickChange(parameters[1]))
+ if (!target->ForceNickChange(parameters[1].c_str()))
{
- // ugh, nickchange failed for some reason -- possibly existing nick?
- User::QuitUser(ServerInstance, target, "Nickname collision");
+ // ugh, nickchange failed for some reason -- possibly existing nick? XXX change to UID here
+ ServerInstance->Users->QuitUser(target, "Nickname collision");
}
// give them a lock flag
syntax = "<locked-nick>";
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user)
{
User* target = ServerInstance->FindNick(parameters[0]);
if (target)
virtual Version GetVersion()
{
- return Version(1, 1, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
}