]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operchans.cpp
Change channel name parameter of Module::OnUserPreJoin() and Channel::JoinUser()...
[user/henk/code/inspircd.git] / src / modules / m_operchans.cpp
index 6df55696e36bfc3ec41cb1f077b79a331200db0d..e0423886fbaf4ab068450b2014f50b8cf27cbc7a 100644 (file)
@@ -44,13 +44,12 @@ 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)
+       ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
        {
                if (chan && chan->IsModeSet('O') && !IS_OPER(user))
                {