]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cycle.cpp
m_spanningtree Remove unneeded #includes
[user/henk/code/inspircd.git] / src / modules / m_cycle.cpp
index 358825a263ed0b6235e9b2dccdebda1ca1017281..b23bf5b92764a0e0654c6142ce3c602564505384 100644 (file)
@@ -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,6 +84,7 @@ class CommandCycle : public Command
 class ModuleCycle : public Module
 {
        CommandCycle cmd;
+
  public:
        ModuleCycle()
                : cmd(this)
@@ -92,18 +93,13 @@ class ModuleCycle : public Module
 
        void init()
        {
-               ServerInstance->AddCommand(&cmd);
-       }
-
-       virtual ~ModuleCycle()
-       {
+               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)