]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_watch.cpp
m_permchannels Save channel TS, topic set time and set by information
[user/henk/code/inspircd.git] / src / modules / m_watch.cpp
index 4012f358cac1feebfdf57ab8bd6d4a7a7826ea5a..ec38edc31b8727b55e922234bc31078af72a64d8 100644 (file)
@@ -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();
-               ServerInstance->AddCommand(&cmdw);
-               ServerInstance->AddCommand(&sw);
-               ServerInstance->Extensions.Register(&cmdw.ext);
+       }
+
+       void init()
+       {
+               OnRehash(NULL);
+               ServerInstance->Modules->AddService(cmdw);
+               ServerInstance->Modules->AddService(sw);
+               ServerInstance->Modules->AddService(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)