]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_lockserv.cpp
m_timedbans Notice user when trying to set a ban that's already set
[user/henk/code/inspircd.git] / src / modules / m_lockserv.cpp
index 3408e4621f278d630d859a2dcc7289588f3de3ac..4983ae16abe3afa01eaa7022feca4fe7c2a51f7c 100644 (file)
@@ -87,12 +87,16 @@ private:
 
 public:
        ModuleLockserv() : lockcommand(this, locked), unlockcommand(this, locked)
+       {
+       }
+
+       void init()
        {
                locked = false;
-               ServerInstance->AddCommand(&lockcommand);
-               ServerInstance->AddCommand(&unlockcommand);
+               ServerInstance->Modules->AddService(lockcommand);
+               ServerInstance->Modules->AddService(unlockcommand);
                Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnCheckReady };
-               ServerInstance->Modules->Attach(eventlist, this, 3);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual ~ModuleLockserv()