]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operchans.cpp
Fix these to use new hook system (u_listmode wasnt fixed yet)
[user/henk/code/inspircd.git] / src / modules / m_operchans.cpp
index 4c3ae4798762b7271488794e26dca9f9970e2331..e96fbc79a8cd40aecbe6382588efd3dd652b72c4 100644 (file)
@@ -54,8 +54,10 @@ class ModuleOperChans : public Module
        {
                                
                oc = new OperChans(ServerInstance);
-               if (!ServerInstance->AddMode(oc, 'O'))
+               if (!ServerInstance->AddMode(oc))
                        throw ModuleException("Could not add new modes!");
+               Implementation eventlist[] = { I_OnUserPreJoin };
+               ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
        void Implements(char* List)
@@ -82,7 +84,7 @@ class ModuleOperChans : public Module
        virtual ~ModuleOperChans()
        {
                ServerInstance->Modes->DelMode(oc);
-               DELETE(oc);
+               delete oc;
        }
        
        virtual Version GetVersion()