X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_oper_hash.cpp;h=b4661741b52b9ce4e44341c62324be6aa78cae94;hb=fed58f5c25915d60d40c0f407914ff7381902f9d;hp=61a43b1e1bd4b815fa576cf90d5f53fdec221397;hpb=540fee57bf71abccaba38c0297b80f8001780c1d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp index 61a43b1e1..b4661741b 100644 --- a/src/modules/m_oper_hash.cpp +++ b/src/modules/m_oper_hash.cpp @@ -2,12 +2,9 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * - * - * Written by Craig Edwards, Craig McLure, and others. + * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * * This program is free but copyrighted software; see * the file COPYING for details. * @@ -17,14 +14,10 @@ /* $ModDesc: Allows for hashed oper passwords */ /* $ModDep: m_hash.h */ -using namespace std; - -#include "inspircd_config.h" +#include "inspircd.h" #include "users.h" #include "channels.h" #include "modules.h" -#include "inspircd.h" - #include "m_hash.h" typedef std::map hashymodules; @@ -84,12 +77,12 @@ class ModuleOperHash : public Module public: ModuleOperHash(InspIRCd* Me) - : Module::Module(Me) + : Module(Me) { /* Read the config file first */ Conf = NULL; - OnRehash(""); + OnRehash(NULL,""); ServerInstance->UseInterface("HashRequest"); @@ -109,7 +102,6 @@ class ModuleOperHash : public Module /* Build a map of them */ hashers[name.c_str()] = *m; names.push_back(name); - ServerInstance->Log(DEBUG, "Found HashRequest interface: '%s' -> '%08x'", name.c_str(), *m); } } else @@ -131,7 +123,7 @@ class ModuleOperHash : public Module List[I_OnRehash] = List[I_OnOperCompare] = 1; } - virtual void OnRehash(const std::string ¶meter) + virtual void OnRehash(userrec* user, const std::string ¶meter) { /* Re-read configuration file */ if (Conf) @@ -168,27 +160,4 @@ class ModuleOperHash : public Module } }; - -class ModuleOperHashFactory : public ModuleFactory -{ - public: - ModuleOperHashFactory() - { - } - - ~ModuleOperHashFactory() - { - } - - virtual Module * CreateModule(InspIRCd* Me) - { - return new ModuleOperHash(Me); - } - -}; - - -extern "C" void * init_module( void ) -{ - return new ModuleOperHashFactory; -} +MODULE_INIT(ModuleOperHash)