diff options
-rw-r--r-- | include/modules.h | 14 | ||||
-rw-r--r-- | src/configreader.cpp | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/include/modules.h b/include/modules.h index 7944aa609..c938e6a9d 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1047,13 +1047,6 @@ class CoreExport ModuleManager : public fakederef<ModuleManager> */ bool PrioritizeHooks(); - /** Expands the name of a module by prepending "m_" and appending ".so". - * No-op if the name already has the ".so" extension. - * @param modname Module name to expand - * @return Module name starting with "m_" and ending with ".so" - */ - static std::string ExpandModName(const std::string& modname); - public: typedef std::map<std::string, Module*> ModuleMap; @@ -1075,6 +1068,13 @@ class CoreExport ModuleManager : public fakederef<ModuleManager> */ ServiceList* NewServices; + /** Expands the name of a module by prepending "m_" and appending ".so". + * No-op if the name already has the ".so" extension. + * @param modname Module name to expand + * @return Module name starting with "m_" and ending with ".so" + */ + static std::string ExpandModName(const std::string& modname); + /** Simple, bog-standard, boring constructor. */ ModuleManager(); diff --git a/src/configreader.cpp b/src/configreader.cpp index 68495623c..974e52abf 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -671,6 +671,7 @@ void ServerConfig::ApplyModules(User* user) std::string name; if (tag->readString("name", name)) { + name = ModuleManager::ExpandModName(name); // if this module is already loaded, the erase will succeed, so we need do nothing // otherwise, we need to add the module (which will be done later) if (removed_modules.erase(name) == 0) |