X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_opermotd.cpp;h=989f97689d20c45f45aa41e8340520e52d5b2043;hb=1377fabfee72994531df274248ed0ce6de483dd2;hp=118c3d6e78fe92719ce377a321119c84f4c8a5c6;hpb=3366ace0a3fbaf7b8a603c0550382c35709bfe1f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index 118c3d6e7..989f97689 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -80,10 +80,14 @@ class ModuleOpermotd : public Module ModuleOpermotd() : cmd(this) { - ServerInstance->AddCommand(&cmd); + } + + void init() + { + ServerInstance->Modules->AddService(cmd); OnRehash(NULL); Implementation eventlist[] = { I_OnRehash, I_OnOper }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual Version GetVersion()