]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Prevent path names from being specified in modules, and move moduledir to a <path...
[user/henk/code/inspircd.git] / src / modules.cpp
index 913293e1357e87e8a5f863242d7daf7c68682378..8957b4bb622522b23ca725e9ed306ae5b8760065 100644 (file)
@@ -52,9 +52,9 @@ void Event::Send()
 // These declarations define the behavours of the base class Module (which does nothing at all)
 
 Module::Module() { }
-bool Module::cull()
+CullResult Module::cull()
 {
-       return true;
+       return classbase::cull();
 }
 Module::~Module() { }
 
@@ -321,6 +321,9 @@ std::string& ModuleManager::LastError()
 
 bool ModuleManager::Load(const char* filename)
 {
+       /* Don't allow people to specify paths for modules, it doesn't work as expected */
+       if (strchr(filename, '/'))
+               return false;
        /* Do we have a glob pattern in the filename?
         * The user wants to load multiple modules which
         * match the pattern.