]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_stripcolor.cpp
Fix STARTTLS sending the 670 numeric within the SSL session, not prior to it
[user/henk/code/inspircd.git] / src / modules / m_stripcolor.cpp
index 2c2b2363fc5fd66b095588cce4460e1cff35a24c..8034f56ee17a21e7742e8661aef2180c6d1eace5 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
@@ -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);
        }
@@ -111,7 +115,7 @@ class ModuleStripColor : public Module
                {
                        Channel* t = (Channel*)dest;
                        ModResult res;
-                       FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (t->GetUser(user),t,"stripcolor"));
+                       FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,t,"stripcolor"));
 
                        if (res == MOD_RES_ALLOW)
                                return MOD_RES_PASSTHRU;
@@ -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);
        }
 
 };