X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_cycle.cpp;h=5f3dddc6f714262e0d042c8ffcf36b50d5c6bef1;hb=9acece70e533fc45d5401e331af25a5e99dab660;hp=c8b6bd8b4b82ec923e433c602a313da3ffa7d812;hpb=6fe1f4e1136f2ab95a88e68af1894bf6002d03f4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index c8b6bd8b4..5f3dddc6f 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -28,10 +28,10 @@ class CommandCycle : public SplitCommand CommandCycle(Module* Creator) : SplitCommand(Creator, "CYCLE", 1) { - Penalty = 3; syntax = " :[reason]"; + Penalty = 3; syntax = " [:]"; } - CmdResult HandleLocal(const std::vector ¶meters, LocalUser* user) + CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE { Channel* channel = ServerInstance->FindChan(parameters[0]); std::string reason = "Cycling"; @@ -44,7 +44,7 @@ class CommandCycle : public SplitCommand if (!channel) { - user->WriteNumeric(ERR_NOSUCHCHANNEL, "%s :No such channel", parameters[0].c_str()); + user->WriteNumeric(Numerics::NoSuchChannel(parameters[0])); return CMD_FAILURE; } @@ -64,7 +64,7 @@ class CommandCycle : public SplitCommand } 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; @@ -84,7 +84,7 @@ class ModuleCycle : public Module 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); } };