]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_tline.cpp
Fix memory leak and invalid vtable location on unload of m_sslinfo
[user/henk/code/inspircd.git] / src / modules / m_tline.cpp
index dd3639fa47c029b607f803a76f7da8e1a23fc1c1..0efd496c6207ce5a4d69556e14e086d5f061149c 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.
@@ -20,9 +20,8 @@
 class CommandTline : public Command
 {
  public:
-       CommandTline (InspIRCd* Instance) : Command(Instance,"TLINE", "o", 1)
+       CommandTline (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"TLINE", "o", 1)
        {
-               this->source = "m_tline.so";
                this->syntax = "<mask>";
        }
 
@@ -62,15 +61,12 @@ class CommandTline : public Command
 
 class ModuleTLine : public Module
 {
-       CommandTline* newcommand;
+       CommandTline cmd;
  public:
        ModuleTLine(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), cmd(Me, this)
        {
-
-               newcommand = new CommandTline(ServerInstance);
-               ServerInstance->AddCommand(newcommand);
-
+               ServerInstance->AddCommand(&cmd);
        }