]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgident.cpp
Add initial query support to m_mysql [patch by Athenon]
[user/henk/code/inspircd.git] / src / modules / m_chgident.cpp
index 82c34457a73451f5f7400fd596c5e66f88fb227d..58a06cbd8366104ed05439dc9b43e2d4ead3bdd8 100644 (file)
@@ -20,9 +20,8 @@
 class CommandChgident : public Command
 {
  public:
-       CommandChgident (InspIRCd* Instance) : Command(Instance,"CHGIDENT", "o", 2)
+       CommandChgident (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"CHGIDENT", "o", 2)
        {
-               this->source = "m_chgident.so";
                syntax = "<nick> <newident>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
@@ -68,15 +67,12 @@ class CommandChgident : public Command
 
 class ModuleChgIdent : public Module
 {
-       CommandChgident* mycommand;
-
+       CommandChgident cmd;
 
 public:
-       ModuleChgIdent(InspIRCd* Me) : Module(Me)
+       ModuleChgIdent(InspIRCd* Me) : Module(Me), cmd(Me, this)
        {
-               mycommand = new CommandChgident(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
-
+               ServerInstance->AddCommand(&cmd);
        }
 
        virtual ~ModuleChgIdent()