X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_stripcolor.cpp;h=adfc8d565e8ecea97379d1335eb917f4afea840b;hb=f8ccaed31d68661d16eae1a412b337af09de111b;hp=bf330808066beffaa488ee16f615b9d207d79809;hpb=9336468f5bfa60318cb57db5126047147b7a21cb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index bf3308080..adfc8d565 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -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 @@ -20,7 +20,7 @@ class ChannelStripColor : public SimpleChannelModeHandler { public: - ChannelStripColor(Module* Creator) : SimpleChannelModeHandler(Creator, 'S') { } + ChannelStripColor(Module* Creator) : SimpleChannelModeHandler(Creator, "stripcolor", 'S') { } }; /** Handles user mode +S @@ -28,7 +28,7 @@ class ChannelStripColor : public SimpleChannelModeHandler class UserStripColor : public SimpleUserModeHandler { public: - UserStripColor(Module* Creator) : SimpleUserModeHandler(Creator, 'S') { } + UserStripColor(Module* Creator) : SimpleUserModeHandler(Creator, "stripcolor", 'S') { } }; @@ -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); } };