]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operchans.cpp
Fix m_ssl_gnutls and perhaps some other things on Windows by recognizing WSAEWOULDBLOCK
[user/henk/code/inspircd.git] / src / modules / m_operchans.cpp
index 6df55696e36bfc3ec41cb1f077b79a331200db0d..ca948d95b3c195e955ffa24bfd84d7a5aad7bc74 100644 (file)
@@ -44,10 +44,9 @@ class ModuleOperChans : public Module
 
        void init()
        {
-               if (!ServerInstance->Modes->AddMode(&oc))
-                       throw ModuleException("Could not add new modes!");
+               ServerInstance->Modules->AddService(oc);
                Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric, I_OnUserPreJoin };
-               ServerInstance->Modules->Attach(eventlist, this, 3);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)