]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_oper_hash.cpp
PROPAGATE this fix
[user/henk/code/inspircd.git] / src / modules / m_oper_hash.cpp
index 80869898cc0445fcc60efeb905ae90ab025c95aa..d8acc3ef96b9e8d4cc001536d1bd706e2ad42fc4 100644 (file)
 /* $ModDesc: Allows for hashed oper passwords */
 /* $ModDep: m_hash.h */
 
-#include "inspircd_config.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 #include "inspircd.h"
-
 #include "m_hash.h"
 
 typedef std::map<irc::string, Module*> hashymodules;
@@ -60,7 +55,7 @@ class cmd_mkpasswd : public command_t
        CmdResult Handle (const char** parameters, int pcnt, userrec *user)
        {
                MakeHash(user, parameters[0], parameters[1]);
-               /* NOTE: Don't propogate this across the network!
+               /* NOTE: Don't propagate this across the network!
                 * We dont want plaintext passes going all over the place...
                 * To make sure it goes nowhere, return CMD_FAILURE!
                 */
@@ -86,10 +81,10 @@ class ModuleOperHash : public Module
                Conf = NULL;
                OnRehash(NULL,"");
 
-               ServerInstance->UseInterface("HashRequest");
+               ServerInstance->Modules->UseInterface("HashRequest");
 
                /* Find all modules which implement the interface 'HashRequest' */
-               modulelist* ml = ServerInstance->FindInterface("HashRequest");
+               modulelist* ml = ServerInstance->Modules->FindInterface("HashRequest");
 
                /* Did we find any modules? */
                if (ml)
@@ -117,7 +112,7 @@ class ModuleOperHash : public Module
        
        virtual ~ModuleOperHash()
        {
-               ServerInstance->DoneWithInterface("HashRequest");
+               ServerInstance->Modules->DoneWithInterface("HashRequest");
        }
 
        void Implements(char* List)
@@ -162,27 +157,4 @@ class ModuleOperHash : public Module
        }
 };
 
-
-class ModuleOperHashFactory : public ModuleFactory
-{
- public:
-       ModuleOperHashFactory()
-       {
-       }
-       
-       ~ModuleOperHashFactory()
-       {
-       }
-       
-       virtual Module * CreateModule(InspIRCd* Me)
-       {
-               return new ModuleOperHash(Me);
-       }
-       
-};
-
-
-extern "C" DllExport void * init_module( void )
-{
-       return new ModuleOperHashFactory;
-}
+MODULE_INIT(ModuleOperHash)