]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_autoop.cpp
Replace OnRehash() with ReadConfig() that is called on boot, on module load and on...
[user/henk/code/inspircd.git] / src / modules / m_autoop.cpp
index 85b14ba7ad6dfdfb1dac8782f292635b316911ae..32e0971882c012f9a8df32b45ea11f7a34caa8fa 100644 (file)
@@ -21,8 +21,6 @@
 #include "inspircd.h"
 #include "listmode.h"
 
-/* $ModDesc: Provides support for the +w channel mode, autoop list */
-
 /** Handles +w channel mode
  */
 class AutoOpList : public ListModeBase
@@ -91,9 +89,6 @@ class ModuleAutoOp : public Module
        {
                ServerInstance->Modules->AddService(mh);
                mh.DoImplements(this);
-
-               Implementation list[] = { I_OnPostJoin, };
-               ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation));
        }
 
        void OnPostJoin(Membership *memb) CXX11_OVERRIDE
@@ -123,7 +118,7 @@ class ModuleAutoOp : public Module
                        for(std::string::size_type i = modeline.length(); i > 1; --i) // we use "i > 1" instead of "i" so we skip the +
                                modechange.push_back(memb->user->nick);
                        if(modechange.size() >= 3)
-                               ServerInstance->SendGlobalMode(modechange, ServerInstance->FakeClient);
+                               ServerInstance->Modes->Process(modechange, ServerInstance->FakeClient);
                }
        }
 
@@ -132,7 +127,7 @@ class ModuleAutoOp : public Module
                mh.DoSyncChannel(chan, proto, opaque);
        }
 
-       void OnRehash(User* user) CXX11_OVERRIDE
+       void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                mh.DoRehash();
        }