X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_oper_hash.cpp;h=8c9ca0556faf3f48c8d985bcf9c1c427cf7aca1e;hb=be36d92f3dcb0ac3772daebff43a5ecfe0a2d364;hp=b9e246c2b4d0e0a360ca6e0d3dd68a44c6320eff;hpb=69cdf24337a462fa4d477f40e7201f1b71eb677a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp index b9e246c2b..8c9ca0556 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,8 +14,6 @@ /* $ModDesc: Allows for hashed oper passwords */ /* $ModDep: m_hash.h */ -using namespace std; - #include "inspircd_config.h" #include "users.h" #include "channels.h" @@ -89,7 +84,9 @@ class ModuleOperHash : public Module /* Read the config file first */ Conf = NULL; - OnRehash(""); + OnRehash(NULL,""); + + ServerInstance->UseInterface("HashRequest"); /* Find all modules which implement the interface 'HashRequest' */ modulelist* ml = ServerInstance->FindInterface("HashRequest"); @@ -107,7 +104,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 @@ -121,6 +117,7 @@ class ModuleOperHash : public Module virtual ~ModuleOperHash() { + ServerInstance->DoneWithInterface("HashRequest"); } void Implements(char* List) @@ -128,7 +125,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)