]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_deaf.cpp
Fix these to use new hook system (u_listmode wasnt fixed yet)
[user/henk/code/inspircd.git] / src / modules / m_deaf.cpp
index ced6adecee5e6889f6740cafc1e9429f566dd803..8e4378ef3d75b89507acd09a3c84277745107024 100644 (file)
@@ -60,10 +60,12 @@ class ModuleDeaf : public Module
                : Module(Me)
        {
                m1 = new User_d(ServerInstance);
-               if (!ServerInstance->AddMode(m1, 'd'))
+               if (!ServerInstance->AddMode(m1))
                        throw ModuleException("Could not add new modes!");
 
                OnRehash(NULL, "");
+               Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash, I_OnBuildExemptList };
+               ServerInstance->Modules->Attach(eventlist, this, 4);
        }
 
        void Implements(char* List)
@@ -77,7 +79,7 @@ class ModuleDeaf : public Module
                deaf_bypasschars = conf->ReadValue("deaf", "bypasschars", 0);
                deaf_bypasschars_uline = conf->ReadValue("deaf", "bypasscharsuline", 0);
 
-               DELETE(conf);
+               delete conf;
        }
 
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
@@ -178,7 +180,7 @@ class ModuleDeaf : public Module
        virtual ~ModuleDeaf()
        {
                ServerInstance->Modes->DelMode(m1);
-               DELETE(m1);
+               delete m1;
        }
 
        virtual Version GetVersion()