X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_watch.cpp;h=28ae052866cbb1d0ccbf2f813425ab68bc95f0d6;hb=84a1569cd60daa64b1ae52a1fff62c0dc4d78850;hp=4012f358cac1feebfdf57ab8bd6d4a7a7826ea5a;hpb=ba5c0db795824c3fc1ad48ce332d7bdc440cb77f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 4012f358c..28ae05286 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -377,15 +377,19 @@ class Modulewatch : public Module public: Modulewatch() - : maxwatch(32), cmdw(this, maxwatch), sw(this) + : maxwatch(32), cmdw(this, maxwatch), sw(this) { - OnRehash(NULL); whos_watching_me = new watchentries(); + } + + void init() + { + OnRehash(NULL); ServerInstance->AddCommand(&cmdw); ServerInstance->AddCommand(&sw); ServerInstance->Extensions.Register(&cmdw.ext); Implementation eventlist[] = { I_OnRehash, I_OnGarbageCollect, I_OnUserQuit, I_OnPostConnect, I_OnUserPostNick, I_On005Numeric, I_OnSetAway }; - ServerInstance->Modules->Attach(eventlist, this, 7); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual void OnRehash(User* user)