]> 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 3e94e9db125b64204ba978c62289a31a9ca93b60..e91bedd70ce4f08f63ad707535570ee55c9ad27f 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.
@@ -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,13 +79,13 @@ class ModuleOperHash : public Module
  public:
 
        ModuleOperHash(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), cmd(Me, this, hashers, names)
        {
                diduseiface = false;
 
                /* Read the config file first */
 //             Conf = NULL;
-               OnRehash(NULL,"");
+               OnRehash(NULL);
 
                /* Find all modules which implement the interface 'HashRequest' */
                modulelist* ml = ServerInstance->Modules->FindInterface("HashRequest");
@@ -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);
        }