X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_delaymsg.cpp;h=cfc06866a90996ac7991f44d66305433fffd4e46;hb=9cdf47629faeec64edc77ff0729dc55946ed753c;hp=1a0734ed9b01506f3ec3d4949f5ad02602576847;hpb=74ee9af96639323d852a8b15be72ee9974e0a826;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 1a0734ed9..cfc06866a 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -46,11 +46,14 @@ class ModuleDelayMsg : public Module public: ModuleDelayMsg() : djm(this) { - if (!ServerInstance->Modes->AddMode(&djm)) - throw ModuleException("Could not add new modes!"); - ServerInstance->Extensions.Register(&djm.jointime); + } + + void init() + { + ServerInstance->Modules->AddService(djm); + ServerInstance->Modules->AddService(djm.jointime); Implementation eventlist[] = { I_OnUserJoin, I_OnUserPreMessage}; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion(); void OnUserJoin(Membership* memb, bool sync, bool created, CUList&);