From d555db40f4b39f10ad06c2449b42711c1e74105f Mon Sep 17 00:00:00 2001 From: aquanight Date: Sat, 2 Feb 2008 22:14:24 +0000 Subject: Make m_password_hash able to pick up hasher modules after it's loaded, meaning m_md5 and m_sha256 no longer have to be loaded before it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8793 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index 25a53fefe..6cc1a3450 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -641,6 +641,19 @@ modulelist* ModuleManager::FindInterface(const std::string &InterfaceName) return &(iter->second.second); } +bool ModuleManager::ModuleHasInterface(Module* mod, const std::string& InterfaceName) +{ + interfacelist::iterator iter = Interfaces.find(InterfaceName); + if (iter == Interfaces.end()) + return false; + else + { + modulelist& ml = iter->second.second; + modulelist::iterator mi = std::find(ml.begin(), ml.end(), mod); + return (mi != ml.end()); + } +} + void ModuleManager::UseInterface(const std::string &InterfaceName) { interfacelist::iterator iter = Interfaces.find(InterfaceName); -- cgit v1.3.1-10-gc9f91