]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modmanager_dynamic.cpp
Make the build reproducible by removing time related macros.
[user/henk/code/inspircd.git] / src / modmanager_dynamic.cpp
index afb690207add374a599c686252ca7819398e3fce..9e940cc3253a615c550b223b5cefc576426884a5 100644 (file)
 
 
 #include "inspircd.h"
-#include "xline.h"
-#include "socket.h"
-#include "socketengine.h"
-#include "command_parse.h"
 #include "exitcodes.h"
 #include <iostream>
 
 #include <dirent.h>
 #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: " + modname;
                return false;
+       }
 
+       const std::string filename = ExpandModName(modname);
        const std::string moduleFile = ServerInstance->Config->Paths.PrependModule(filename);
 
        if (!FileSystem::FileExists(moduleFile))