]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cycle.cpp
Merge pull request #1147 from SaberUK/insp20+gcc6
[user/henk/code/inspircd.git] / src / modules / m_cycle.cpp
index b28edde83de2bf49294648422d7f818cd82c262b..383e7b5a2d538bf2ea0a48298788543652522109 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for unreal-style CYCLE command. */
+/* $ModDesc: Provides command CYCLE, acts as a server-side HOP command to part and rejoin a channel. */
 
 /** Handle /CYCLE
  */
@@ -60,7 +60,7 @@ class CommandCycle : public Command
                                if (channel->GetPrefixValue(user) < VOICE_VALUE && channel->IsBanned(user))
                                {
                                        /* banned, boned. drop the message. */
-                                       user->WriteServ("NOTICE "+std::string(user->nick)+" :*** You may not cycle, as you are banned on channel " + channel->name);
+                                       user->WriteServ("NOTICE "+user->nick+" :*** You may not cycle, as you are banned on channel " + channel->name);
                                        return CMD_FAILURE;
                                }
 
@@ -88,7 +88,11 @@ class ModuleCycle : public Module
        ModuleCycle()
                : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(cmd);
        }
 
        virtual ~ModuleCycle()
@@ -97,7 +101,7 @@ class ModuleCycle : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Provides support for unreal-style CYCLE command.", VF_VENDOR);
+               return Version("Provides command CYCLE, acts as a server-side HOP command to part and rejoin a channel.", VF_VENDOR);
        }
 
 };