X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodmanager_dynamic.cpp;h=9a687ad2bf1af38002134ff30aefc3f288ff6603;hb=63aa8d0d42f619c52d382bde3e6ba2e5e23b12ac;hp=afb690207add374a599c686252ca7819398e3fce;hpb=f71e6bf9cb41811f18864f5d4eecb26e29d03f25;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index afb690207..9a687ad2b 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -18,10 +18,6 @@ #include "inspircd.h" -#include "xline.h" -#include "socket.h" -#include "socketengine.h" -#include "command_parse.h" #include "exitcodes.h" #include @@ -31,12 +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: " + modname; return false; + } + const std::string filename = ExpandModName(modname); const std::string moduleFile = ServerInstance->Config->Paths.PrependModule(filename); if (!FileSystem::FileExists(moduleFile))