]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockcolor.cpp
Move OnSync{Channel,Network,User} to ServerEventListener.
[user/henk/code/inspircd.git] / src / modules / m_blockcolor.cpp
index 7c961d96aab49f2bfd902d5e00dcac03638fd5f9..e3135185d2e63b55ec73599ff0f073c6b97c1433 100644 (file)
 #include "inspircd.h"
 #include "modules/exemption.h"
 
-/** Handles the +c channel mode
- */
-class BlockColor : public SimpleChannelModeHandler
-{
- public:
-       BlockColor(Module* Creator) : SimpleChannelModeHandler(Creator, "blockcolor", 'c') { }
-};
-
 class ModuleBlockColor : public Module
 {
        CheckExemption::EventProvider exemptionprov;
-       BlockColor bc;
+       SimpleChannelModeHandler bc;
  public:
 
        ModuleBlockColor()
                : exemptionprov(this)
-               , bc(this)
+               , bc(this, "blockcolor", 'c')
        {
        }
 
@@ -54,8 +46,7 @@ class ModuleBlockColor : public Module
                if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
                {
                        Channel* c = (Channel*)dest;
-                       ModResult res;
-                       FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, c, "blockcolor"));
+                       ModResult res = CheckExemption::Call(exemptionprov, user, c, "blockcolor");
 
                        if (res == MOD_RES_ALLOW)
                                return MOD_RES_PASSTHRU;