]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_svshold.cpp
MetaData rework
[user/henk/code/inspircd.git] / src / modules / m_svshold.cpp
index 2dc0e22ef40da24ab0c1e1b59b9592eeffcfe2b5..276fef038cab386c6695a06b738eb8ce689d5e11 100644 (file)
@@ -3,7 +3,7 @@
  *       +------------------------------------+
  *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -142,19 +142,17 @@ class CommandSvshold : public Command
 
 class ModuleSVSHold : public Module
 {
-       CommandSvshold *mycommand;
-       SVSHoldFactory *s;
+       CommandSvshold cmd;
+       SVSHoldFactory s;
 
 
  public:
-       ModuleSVSHold(InspIRCd* Me) : Module(Me)
+       ModuleSVSHold(InspIRCd* Me) : Module(Me), cmd(Me), s(Me)
        {
-               s = new SVSHoldFactory(ServerInstance);
-               ServerInstance->XLines->RegisterFactory(s);
-               mycommand = new CommandSvshold(Me);
-               ServerInstance->AddCommand(mycommand);
-               Implementation eventlist[] = { I_OnUserPreNick, I_OnSyncOtherMetaData, I_OnDecodeMetaData, I_OnStats };
-               ServerInstance->Modules->Attach(eventlist, this, 4);
+               ServerInstance->XLines->RegisterFactory(&s);
+               ServerInstance->AddCommand(&cmd);
+               Implementation eventlist[] = { I_OnUserPreNick, I_OnStats };
+               ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
 
@@ -183,7 +181,7 @@ class ModuleSVSHold : public Module
        virtual ~ModuleSVSHold()
        {
                ServerInstance->XLines->DelAll("SVSHOLD");
-               ServerInstance->XLines->UnregisterFactory(s);
+               ServerInstance->XLines->UnregisterFactory(&s);
        }
 
        virtual Version GetVersion()