X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_lockserv.cpp;h=4983ae16abe3afa01eaa7022feca4fe7c2a51f7c;hb=4e24fb7c19cff866eda602349fbafce78b7e4c51;hp=3408e4621f278d630d859a2dcc7289588f3de3ac;hpb=1fe23633b78b836f6c906b651255c1bd169f3778;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index 3408e4621..4983ae16a 100644 --- a/src/modules/m_lockserv.cpp +++ b/src/modules/m_lockserv.cpp @@ -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()