X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_cycle.cpp;h=bd09f5ae6214d34570e95d3069d03bc10353da8d;hb=e9e75e50bc25e67af22dd88b39b12217a553d5cb;hp=4aa8e9c204eecec985a87b7690c724a9f9960723;hpb=1cb05553e286227e6bbd463d0b4b8cae40ff3940;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index 4aa8e9c20..bd09f5ae6 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -24,16 +24,17 @@ /** Handle /CYCLE */ -class CommandCycle : public Command +class CommandCycle : public SplitCommand { public: - CommandCycle(Module* Creator) : Command(Creator,"CYCLE", 1) + CommandCycle(Module* Creator) + : SplitCommand(Creator, "CYCLE", 1) { Penalty = 3; syntax = " :[reason]"; TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } - CmdResult Handle (const std::vector ¶meters, User *user) + CmdResult HandleLocal(const std::vector ¶meters, LocalUser* user) { Channel* channel = ServerInstance->FindChan(parameters[0]); std::string reason = ConvToStr("Cycling"); @@ -65,8 +66,7 @@ class CommandCycle : public Command } channel->PartUser(user, reason); - - Channel::JoinUser(user, parameters[0], true, "", false, ServerInstance->Time()); + Channel::JoinUser(user, parameters[0], true); } return CMD_SUCCESS; @@ -84,6 +84,7 @@ class CommandCycle : public Command class ModuleCycle : public Module { CommandCycle cmd; + public: ModuleCycle() : cmd(this) @@ -95,15 +96,10 @@ class ModuleCycle : public Module ServerInstance->Modules->AddService(cmd); } - virtual ~ModuleCycle() - { - } - virtual Version GetVersion() { return Version("Provides command CYCLE, acts as a server-side HOP command to part and rejoin a channel.", VF_VENDOR); } - }; MODULE_INIT(ModuleCycle)