summaryrefslogtreecommitdiff
path: root/src/modmanager_dynamic.cpp
diff options
context:
space:
mode:
authorDaniel De Graaf <danieldg@inspircd.org>2010-08-03 10:03:50 -0400
committerDaniel De Graaf <danieldg@inspircd.org>2010-08-03 10:03:50 -0400
commit5b5ebc7fb7bf34c1c9878a570408f37dc29c86b8 (patch)
treeae62ac2917679ea094560aaeb9c58a15fe5a9b02 /src/modmanager_dynamic.cpp
parent0e31bd8ab43e3ef233a67be399479ae982052d23 (diff)
Remove wildcard support from module loading, breaks rehash (bug #51)
Diffstat (limited to 'src/modmanager_dynamic.cpp')
-rw-r--r--src/modmanager_dynamic.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp
index 3845fd6da..c75ea3123 100644
--- a/src/modmanager_dynamic.cpp
+++ b/src/modmanager_dynamic.cpp
@@ -30,36 +30,6 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
/* Don't allow people to specify paths for modules, it doesn't work as expected */
if (filename.find('/') != std::string::npos)
return false;
- /* Do we have a glob pattern in the filename?
- * The user wants to load multiple modules which
- * match the pattern.
- */
- if (strchr(filename.c_str(),'*') || (strchr(filename.c_str(),'?')))
- {
- int n_match = 0;
- DIR* library = opendir(ServerInstance->Config->ModPath.c_str());
- if (library)
- {
- /* Try and locate and load all modules matching the pattern */
- dirent* entry = NULL;
- while (0 != (entry = readdir(library)))
- {
- if (entry->d_name[0] == '.')
- continue;
- if (InspIRCd::Match(entry->d_name, filename.c_str(), ascii_case_insensitive_map))
- {
- if (!this->Load(entry->d_name, defer))
- n_match++;
- }
- }
- closedir(library);
- }
- /* Loadmodule will now return false if any one of the modules failed
- * to load (but wont abort when it encounters a bad one) and when 1 or
- * more modules were actually loaded.
- */
- return (n_match > 0 ? false : true);
- }
char modfile[MAXBUF];
snprintf(modfile,MAXBUF,"%s/%s",ServerInstance->Config->ModPath.c_str(),filename.c_str());