From b456adc15562f7e41c85fea84528cc0879233ee6 Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Mon, 30 Nov 2020 21:12:52 +0100 Subject: Fix issue where m_pbkdf2 was not aware of services loaded before it --- src/modules/m_pbkdf2.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/m_pbkdf2.cpp b/src/modules/m_pbkdf2.cpp index 90fa54a77..077390741 100644 --- a/src/modules/m_pbkdf2.cpp +++ b/src/modules/m_pbkdf2.cpp @@ -209,6 +209,14 @@ class ModulePBKDF2 : public Module stdalgo::delete_all(providers); } + void init() CXX11_OVERRIDE + { + // Let ourself know about any existing services. + const ModuleManager::DataProviderMap& dataproviders = ServerInstance->Modules->DataProviders; + for (ModuleManager::DataProviderMap::const_iterator it = dataproviders.begin(); it != dataproviders.end(); ++it) + OnServiceAdd(*it->second); + } + void OnServiceAdd(ServiceProvider& provider) CXX11_OVERRIDE { // Check if it's a hash provider -- cgit v1.2.3