X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_operchans.cpp;h=ca948d95b3c195e955ffa24bfd84d7a5aad7bc74;hb=47332d6e9b990498dd35457090dd8983d8aae8d3;hp=6df55696e36bfc3ec41cb1f077b79a331200db0d;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 6df55696e..ca948d95b 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -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)