X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_cycle.cpp;h=b23bf5b92764a0e0654c6142ce3c602564505384;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=10b593fdd31acf3ec90f8882ac5a693c94290e5d;hpb=c8b41aa5d256d99eee67ec94492a94dc30e0ea35;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index 10b593fdd..b23bf5b92 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -66,7 +66,7 @@ class CommandCycle : public Command channel->PartUser(user, reason); - Channel::JoinUser(user, parameters[0].c_str(), true, "", false, ServerInstance->Time()); + Channel::JoinUser(user, parameters[0], true, "", false, ServerInstance->Time()); } return CMD_SUCCESS; @@ -84,22 +84,22 @@ class CommandCycle : public Command class ModuleCycle : public Module { CommandCycle cmd; + public: ModuleCycle() : cmd(this) { - ServerInstance->AddCommand(&cmd); } - virtual ~ModuleCycle() + void init() { + ServerInstance->Modules->AddService(cmd); } 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)