]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
This segfaults atm. i'm working on it.
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 24 Feb 2008 14:32:06 +0000 (14:32 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 24 Feb 2008 14:32:06 +0000 (14:32 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9016 e03df62e-2008-0410-955e-edbf42e46eb7

src/configreader.cpp
src/modules.cpp

index d2a7ccfd4ed9cb1bdc479e5f0321f69736995435..be2b52ae13f41c51656da5501e612718c0b46f14 100644 (file)
@@ -1336,6 +1336,8 @@ int ServerConfig::DoDownloads()
                CompletedFiles[x->first] = true;
        }
 
+       ServerInstance->Logs->Log("CONFIG",DEBUG,"Returning %d from DoDownloads()", new_downloads);
+
        return new_downloads;
 }
 
@@ -1398,7 +1400,10 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const char* filename, std::o
                        if (!scan_for_includes_only)
                        {
                                if (x->second)
+                               {
+                                       ServerInstance->Logs->Log("CONFIG",DEBUG,"Retrieve conf");
                                        conf = IncludedFiles.find(filename)->second;
+                               }
                                else
                                {
                                        errorstream << "File " << filename << " could not be opened." << std::endl;
@@ -1408,6 +1413,9 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const char* filename, std::o
                }
        }
 
+       if (!conf)
+               return false;
+
        ServerInstance->Logs->Log("CONFIG",DEBUG,"Start to read conf %s %08lx", filename, conf);
 
        /* Start reading characters... */
index 3e7ae9cdfd100c4b3b4714090930410d67fa2676..c3315490ed5b02f238670d3efa6e5a12529f665e 100644 (file)
@@ -551,14 +551,17 @@ void ModuleManager::LoadAll()
 
        for(int count = 0; count < Instance->Config->ConfValueEnum(Instance->Config->config_data, "module"); count++)
        {
-               Instance->Config->ConfValue(Instance->Config->config_data, "module", "name", count, configToken, MAXBUF);
-               printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n",configToken);
-               
-               if (!this->Load(configToken))           
+               if (!this->Find(configToken))
                {
-                       Instance->Logs->Log("MODULE", DEFAULT, this->LastError());
-                       printf_c("\n[\033[1;31m*\033[0m] %s\n\n", this->LastError().c_str());
-                       Instance->Exit(EXIT_STATUS_MODULE);
+                       Instance->Config->ConfValue(Instance->Config->config_data, "module", "name", count, configToken, MAXBUF);
+                       printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n",configToken);
+                       
+                       if (!this->Load(configToken))           
+                       {
+                               Instance->Logs->Log("MODULE", DEFAULT, this->LastError());
+                               printf_c("\n[\033[1;31m*\033[0m] %s\n\n", this->LastError().c_str());
+                               Instance->Exit(EXIT_STATUS_MODULE);
+                       }
                }
        }
 }