]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operchans.cpp
Should now work with ports bound to all interfaces
[user/henk/code/inspircd.git] / src / modules / m_operchans.cpp
index 98656b8bb764dea1a75b048b77767748b5a15241..d73fb58cfb48c46db455dba3f3f7675ad7c1e148 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);
@@ -69,7 +69,7 @@ class ModuleOperChans : public Module
                        {
                                if (chan->IsModeSet('O'))
                                {
-                                       user->WriteServ("520 %s %s :Only IRC operators may join the channel %s (+O is set)",user->nick, chan->name,chan->name);
+                                       user->WriteNumeric(520, "%s %s :Only IRC operators may join the channel %s (+O is set)",user->nick, chan->name,chan->name);
                                        return 1;
                                }
                        }
@@ -85,7 +85,7 @@ class ModuleOperChans : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,0,VF_VENDOR|VF_COMMON,API_VERSION);
+               return Version(1,2,0,0,VF_VENDOR|VF_COMMON,API_VERSION);
        }
 };