X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_password_hash.cpp;h=e91bedd70ce4f08f63ad707535570ee55c9ad27f;hb=2630a87bb13b089e6d0fdcff4bcd0f3a9612e52f;hp=68768bae662789e7dda748e1f1a750eb3f6be858;hpb=b6dbd6caab62bc2c0d11ce5a45d511611eb9c2ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp index 68768bae6..e91bedd70 100644 --- a/src/modules/m_password_hash.cpp +++ b/src/modules/m_password_hash.cpp @@ -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 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); }