CommandCycle(Module* Creator)
: SplitCommand(Creator, "CYCLE", 1)
{
- Penalty = 3; syntax = "<channel> :[reason]";
+ Penalty = 3; syntax = "<channel> [:<reason>]";
}
- CmdResult HandleLocal(const std::vector<std::string> ¶meters, LocalUser* user)
+ CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE
{
Channel* channel = ServerInstance->FindChan(parameters[0]);
std::string reason = "Cycling";
if (!channel)
{
- user->WriteNumeric(ERR_NOSUCHCHANNEL, "%s :No such channel", parameters[0].c_str());
+ user->WriteNumeric(Numerics::NoSuchChannel(parameters[0]));
return CMD_FAILURE;
}
}
else
{
- user->WriteNumeric(ERR_NOTONCHANNEL, "%s :You're not on that channel", channel->name.c_str());
+ user->WriteNumeric(ERR_NOTONCHANNEL, channel->name, "You're not on that channel");
}
return CMD_FAILURE;
Version GetVersion() CXX11_OVERRIDE
{
- return Version("Provides command CYCLE, acts as a server-side HOP command to part and rejoin a channel.", VF_VENDOR);
+ return Version("Provides the CYCLE command, acts as a server-side HOP command to part and rejoin a channel", VF_VENDOR);
}
};