aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorGravatar aquanight2008-02-02 22:14:24 +0000
committerGravatar aquanight2008-02-02 22:14:24 +0000
commitd555db40f4b39f10ad06c2449b42711c1e74105f (patch)
tree36928004553bab7826b8053a349f1bde7265ceeb /src/modules.cpp
parentFix a null pointer dereference caused by my reordering/moving stuff (diff)
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
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp13
1 files changed, 13 insertions, 0 deletions
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);