]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_stripcolor.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / m_stripcolor.cpp
index b7e26afd5bbf3d97119786062f5193cad7f2ec69..b50c22297255a40bca75e93c42951f0ae8d82cda 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides channel +S mode (strip ansi color) */
-
 /** Handles channel mode +S
  */
 class ChannelStripColor : public SimpleChannelModeHandler
@@ -54,8 +52,6 @@ class ModuleStripColor : public Module
        {
                ServerInstance->Modules->AddService(usc);
                ServerInstance->Modules->AddService(csc);
-               Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
@@ -72,7 +68,7 @@ class ModuleStripColor : public Module
                if (target_type == TYPE_USER)
                {
                        User* t = (User*)dest;
-                       active = t->IsModeSet('S');
+                       active = t->IsModeSet(usc);
                }
                else if (target_type == TYPE_CHANNEL)
                {
@@ -82,7 +78,7 @@ class ModuleStripColor : public Module
                        if (res == MOD_RES_ALLOW)
                                return MOD_RES_PASSTHRU;
 
-                       active = !t->GetExtBanStatus(user, 'S').check(!t->IsModeSet('S'));
+                       active = !t->GetExtBanStatus(user, 'S').check(!t->IsModeSet(csc));
                }
 
                if (active)