]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_password_hash.cpp
Include explicit routing information in Command, will replace CMD_LOCALONLY return...
[user/henk/code/inspircd.git] / src / modules / m_password_hash.cpp
index 52c8f241cb77382df7fdd016a053f0f8d4479c40..e91bedd70ce4f08f63ad707535570ee55c9ad27f 100644 (file)
@@ -71,7 +71,7 @@ class CommandMkpasswd : public Command
 class ModuleOperHash : public Module
 {
 
-       CommandMkpasswd* mycommand;
+       CommandMkpasswd cmd;
        hashymodules hashers; /* List of modules which implement HashRequest */
        std::deque<std::string> names; /* Module names which implement HashRequest */
 
@@ -79,7 +79,7 @@ class ModuleOperHash : public Module
  public:
 
        ModuleOperHash(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), cmd(Me, this, hashers, names)
        {
                diduseiface = false;
 
@@ -109,8 +109,7 @@ class ModuleOperHash : public Module
                        diduseiface = true;
                }
 
-               mycommand = new CommandMkpasswd(ServerInstance, this, hashers, names);
-               ServerInstance->AddCommand(mycommand);
+               ServerInstance->AddCommand(&cmd);
                Implementation eventlist[] = { I_OnPassCompare, I_OnLoadModule };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }