]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockcolor.cpp
Merge pull request #1147 from SaberUK/insp20+gcc6
[user/henk/code/inspircd.git] / src / modules / m_blockcolor.cpp
index f2ba0603f6bd0d46ae63bf11d7d012107f6491aa..3cc01b4c05bcc842f98f121e41da040ec5b366fa 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for unreal-style channel mode +c */
+/* $ModDesc: Provides channel mode +c to block color */
 
 /** Handles the +c channel mode
  */
@@ -35,16 +35,18 @@ class BlockColor : public SimpleChannelModeHandler
 
 class ModuleBlockColor : public Module
 {
-       bool AllowChanOps;
        BlockColor bc;
  public:
 
        ModuleBlockColor() : bc(this)
        {
-               if (!ServerInstance->Modes->AddMode(&bc))
-                       throw ModuleException("Could not add new modes!");
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(bc);
                Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, 3);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual void On005Numeric(std::string &output)
@@ -95,7 +97,7 @@ class ModuleBlockColor : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Provides support for unreal-style channel mode +c",VF_VENDOR);
+               return Version("Provides channel mode +c to block color",VF_VENDOR);
        }
 };