]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Fix these to use new hook system (u_listmode wasnt fixed yet)
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index 753c8be4b64b4c55239707e85c0f805508b055b5..d8dae202bd9d97cc3e60b7effb086c38334f2060 100644 (file)
@@ -78,6 +78,9 @@ class CloakUser : public ModeHandler
                if (!IS_LOCAL(dest))
                        return MODEACTION_ALLOW;
 
+               /* don't allow this user to spam modechanges */
+               dest->IncreasePenalty(5);
+
                if (adding)
                {
                        if(!dest->IsModeSet('x'))
@@ -331,12 +334,14 @@ class ModuleCloaking : public Module
                        throw ModuleException("Could not add new modes!");
 
                OnRehash(NULL,"");
+               Implementation eventlist[] = { I_OnRehash };
+               ServerInstance->Modules->Attach(eventlist, this, 1);
        }
        
        virtual ~ModuleCloaking()
        {
                ServerInstance->Modes->DelMode(cu);
-               DELETE(cu);
+               delete cu;
                ServerInstance->Modules->DoneWithInterface("HashRequest");
        }