]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_stripcolor.cpp
Fix TBAN not working if the banner is owner/protected
[user/henk/code/inspircd.git] / src / modules / m_stripcolor.cpp
index 37999b3192c7cd3bf581814cf9a59f78c9892431..113c931cbaeff9a441f01bd719ba9fd6bfc8d46f 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -28,7 +28,7 @@ class ChannelStripColor : public SimpleChannelModeHandler
 class UserStripColor : public SimpleUserModeHandler
 {
  public:
-       UserStripColor(Module* Creator) : SimpleUserModeHandler(Creator, "stripcolor", 'S') { }
+       UserStripColor(Module* Creator) : SimpleUserModeHandler(Creator, "u_stripcolor", 'S') { }
 };
 
 
@@ -41,8 +41,12 @@ class ModuleStripColor : public Module
  public:
        ModuleStripColor() : csc(this), usc(this)
        {
-               if (!ServerInstance->Modes->AddMode(&usc) || !ServerInstance->Modes->AddMode(&csc))
-                       throw ModuleException("Could not add new modes!");
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(usc);
+               ServerInstance->Modules->AddService(csc);
                Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
@@ -134,7 +138,7 @@ class ModuleStripColor : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Provides channel +S mode (strip ansi colour)", VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides channel +S mode (strip ansi colour)", VF_VENDOR);
        }
 
 };