aboutsummaryrefslogtreecommitdiffstats
path: root/src/modmanager_dynamic.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2015-05-20 15:02:24 +0200
committerGravatar Attila Molnar2015-05-20 15:02:24 +0200
commit7bb75e575b5f6a555a0651057c0cb5b30f93a9d9 (patch)
treec99cd7056aa20ce999c678501d6733f3ad3662c2 /src/modmanager_dynamic.cpp
parentm_spanningtree Fix harmless valgrind warning about uninit var usage on unload (diff)
Allow modules to be called as "foo" instead of "m_foo.so"
Diffstat (limited to 'src/modmanager_dynamic.cpp')
-rw-r--r--src/modmanager_dynamic.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp
index fc6161e31..9a687ad2b 100644
--- a/src/modmanager_dynamic.cpp
+++ b/src/modmanager_dynamic.cpp
@@ -27,15 +27,16 @@
#ifndef PURE_STATIC
-bool ModuleManager::Load(const std::string& filename, bool defer)
+bool ModuleManager::Load(const std::string& modname, bool defer)
{
/* Don't allow people to specify paths for modules, it doesn't work as expected */
- if (filename.find('/') != std::string::npos)
+ if (modname.find('/') != std::string::npos)
{
- LastModuleError = "You can't load modules with a path: " + filename;
+ LastModuleError = "You can't load modules with a path: " + modname;
return false;
}
+ const std::string filename = ExpandModName(modname);
const std::string moduleFile = ServerInstance->Config->Paths.PrependModule(filename);
if (!FileSystem::FileExists(moduleFile))