]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cycle.cpp
Merge pull request #1018 from SaberUK/insp20+hidekills
[user/henk/code/inspircd.git] / src / modules / m_cycle.cpp
index 1eb3c18994bd506a695aa0890a5035879334e913..383e7b5a2d538bf2ea0a48298788543652522109 100644 (file)
@@ -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()