]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_invisible.cpp
Fix these to use new hook system (u_listmode wasnt fixed yet)
[user/henk/code/inspircd.git] / src / modules / m_invisible.cpp
index d1fa5162a4b958716cb4af30274ba80c0155900d..2986f43c6497c99c89d082429492f302566a0ddf 100644 (file)
@@ -167,15 +167,17 @@ class ModuleInvisible : public Module
 
                /* Yeah i know people can take this out. I'm not about to obfuscate code just to be a pain in the ass. */
                ServerInstance->ServerNoticeAll("*** m_invisible.so has just been loaded on this network. For more information, please visit http://inspircd.org/wiki/Modules/invisible");
+               Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserJoin, I_OnUserPart, I_OnUserQuit, I_OnRehash };
+               ServerInstance->Modules->Attach(eventlist, this, 6);
        }
 
        virtual ~ModuleInvisible()
        {
                ServerInstance->Modes->DelMode(qm);
                ServerInstance->Modes->DelModeWatcher(ido);
-               DELETE(qm);
-               DELETE(ido);
-               DELETE(conf);
+               delete qm;
+               delete ido;
+               delete conf;
        }
 
        virtual Version GetVersion()
@@ -201,7 +203,7 @@ class ModuleInvisible : public Module
 
        virtual void OnRehash(User* user, const std::string &parameter)
        {
-               DELETE(conf);
+               delete conf;
                conf = new ConfigReader(ServerInstance);
        }