]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_stripcolor.cpp
Remove VF_COMMON from mode-provider modules (no longer needed due to better CAPAB...
[user/henk/code/inspircd.git] / src / modules / m_stripcolor.cpp
index e610987d335c7be75f59bdefd1b4d3464c33af14..adfc8d565e8ecea97379d1335eb917f4afea840b 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
@@ -110,13 +110,11 @@ class ModuleStripColor : public Module
                else if (target_type == TYPE_CHANNEL)
                {
                        Channel* t = (Channel*)dest;
+                       ModResult res;
+                       FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,t,"stripcolor"));
 
-                       // check if we allow ops to bypass filtering, if we do, check if they're opped accordingly.
-                       // note: short circut logic here, don't wreck it. -- w00t
-                       if (CHANOPS_EXEMPT('S') && t->GetPrefixValue(user) == OP_VALUE)
-                       {
+                       if (res == MOD_RES_ALLOW)
                                return MOD_RES_PASSTHRU;
-                       }
 
                        active = !t->GetExtBanStatus(user, 'S').check(!t->IsModeSet('S'));
                }
@@ -136,7 +134,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);
        }
 
 };