]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_watch.cpp
Include explicit routing information in Command, will replace CMD_LOCALONLY return...
[user/henk/code/inspircd.git] / src / modules / m_watch.cpp
index e70270424978a17b0a7aad85ed83f8394ba0784a..9b98ca83badedc4b958e6ab5f3301e89b55b1b08 100644 (file)
@@ -367,20 +367,18 @@ class CommandWatch : public Command
 
 class Modulewatch : public Module
 {
-       CommandWatch* mycommand;
-       CommandSVSWatch *sw;
        unsigned int maxwatch;
+       CommandWatch cmdw;
+       CommandSVSWatch sw;
 
  public:
        Modulewatch(InspIRCd* Me)
-               : Module(Me), maxwatch(32)
+               : Module(Me), maxwatch(32), cmdw(Me, maxwatch), sw(Me)
        {
                OnRehash(NULL);
                whos_watching_me = new watchentries();
-               mycommand = new CommandWatch(ServerInstance, maxwatch);
-               ServerInstance->AddCommand(mycommand);
-               sw = new CommandSVSWatch(ServerInstance);
-               ServerInstance->AddCommand(sw);
+               ServerInstance->AddCommand(&cmdw);
+               ServerInstance->AddCommand(&sw);
                Implementation eventlist[] = { I_OnRehash, I_OnGarbageCollect, I_OnCleanup, I_OnUserQuit, I_OnPostConnect, I_OnUserPostNick, I_On005Numeric, I_OnSetAway };
                ServerInstance->Modules->Attach(eventlist, this, 8);
        }