]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_stripcolor.cpp
Replace strip/blockcolor tags with <options:exemptchanops>, sexy string of modes...
[user/henk/code/inspircd.git] / src / modules / m_stripcolor.cpp
index e2f7482a9e3913a51742be8038fce507104fe9e0..76bc56ef5d6df97e3ad47aa8e7703bbbcf62c5c9 100644 (file)
@@ -92,8 +92,6 @@ class ModuleStripColor : public Module
  public:
        ModuleStripColor(InspIRCd* Me) : Module::Module(Me)
        {
-               OnRehash(NULL, "");
-
                usc = new UserStripColor(ServerInstance);
                csc = new ChannelStripColor(ServerInstance);
 
@@ -103,7 +101,7 @@ class ModuleStripColor : public Module
 
        void Implements(char* List)
        {
-               List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
+               List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1;
        }
 
        virtual ~ModuleStripColor()
@@ -164,13 +162,6 @@ class ModuleStripColor : public Module
                }
        }
 
-       virtual void OnRehash(userrec* user, const std::string &parameter)
-       {
-               ConfigReader Conf(ServerInstance);
-
-               AllowChanOps = Conf.ReadFlag("stripcolor", "allowchanops", 0);
-       }
-       
        virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                if (!IS_LOCAL(user))
@@ -188,7 +179,7 @@ class ModuleStripColor : public Module
 
                        // 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 (!AllowChanOps || AllowChanOps && t->GetStatus(user) != STATUS_OP)
+                       if (!CHANOPS_EXEMPT(ServerInstance, 'S') || CHANOPS_EXEMPT(ServerInstance, 'S') && t->GetStatus(user) != STATUS_OP)
                                active = t->IsModeSet('S');
                }