]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operchans.cpp
Fix recommended by nenolod, silly mistake apparently :P
[user/henk/code/inspircd.git] / src / modules / m_operchans.cpp
index 98656b8bb764dea1a75b048b77767748b5a15241..549e4008dfbeffafb3a841d08b4b2ef049c46884 100644 (file)
@@ -21,7 +21,7 @@ class OperChans : public ModeHandler
        /* This is an oper-only mode */
        OperChans(InspIRCd* Instance) : ModeHandler(Instance, 'O', 0, 0, false, MODETYPE_CHANNEL, true) { }
 
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
                if (adding)
                {
@@ -54,7 +54,7 @@ class ModuleOperChans : public Module
        {
                                
                oc = new OperChans(ServerInstance);
-               if (!ServerInstance->AddMode(oc))
+               if (!ServerInstance->Modes->AddMode(oc))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnUserPreJoin };
                ServerInstance->Modules->Attach(eventlist, this, 1);