]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modmanager_dynamic.cpp
2.0.1 release
[user/henk/code/inspircd.git] / src / modmanager_dynamic.cpp
index c0114ed4eb8714c4eb50f8efa5cb5316dc25cfc4..c75ea3123b0648d211380d3e01d48894067bc30f 100644 (file)
@@ -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());
@@ -92,7 +62,8 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
                        Modules[filename] = newmod;
                        if (defer)
                        {
-                               ServerInstance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s", filename.c_str());
+                               ServerInstance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s (Module version %s)",
+                                       filename.c_str(), newhandle->GetVersion().c_str());
                        }
                        else
                        {
@@ -251,6 +222,7 @@ void ModuleManager::LoadAll()
                Module* mod = i->second;
                try 
                {
+                       ServerInstance->Logs->Log("MODULE", DEBUG, "Initializing %s", i->first.c_str());
                        mod->init();
                }
                catch (CoreException& modexcept)