]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgname.cpp
Add initial query support to m_mysql [patch by Athenon]
[user/henk/code/inspircd.git] / src / modules / m_chgname.cpp
index 29fc695abccbf04af1c3829b77243be2aec7f79d..23c870294cf00153cc8e589ce2c662289530c3d6 100644 (file)
@@ -20,9 +20,8 @@
 class CommandChgname : public Command
 {
  public:
-       CommandChgname (InspIRCd* Instance) : Command(Instance,"CHGNAME", "o", 2, 2)
+       CommandChgname (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"CHGNAME", "o", 2, 2)
        {
-               this->source = "m_chgname.so";
                syntax = "<nick> <newname>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
@@ -63,15 +62,12 @@ class CommandChgname : public Command
 
 class ModuleChgName : public Module
 {
-       CommandChgname* mycommand;
-
+       CommandChgname cmd;
 
 public:
-       ModuleChgName(InspIRCd* Me) : Module(Me)
+       ModuleChgName(InspIRCd* Me) : Module(Me), cmd(Me, this)
        {
-               mycommand = new CommandChgname(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
-
+               ServerInstance->AddCommand(&cmd);
        }
 
        virtual ~ModuleChgName()