X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodmanager_dynamic.cpp;h=9e940cc3253a615c550b223b5cefc576426884a5;hb=7770cd985405c7630e9149fc08c314ec824a9c75;hp=fc6161e3175f2320d22e331bd3d52c22a6369295;hpb=8f5efbc7aa33b792e02d01e3288f553e6e98ccaa;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index fc6161e31..9e940cc32 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -25,17 +25,18 @@ #include #endif -#ifndef PURE_STATIC +#ifndef INSPIRCD_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))