]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Put log-switching back into configreader
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 8999e7ccc8c2117e179299373fd666b5d02e0db7..aaad2746ada3a7206134ebaad5a5e6371e5f1556 100644 (file)
@@ -308,6 +308,11 @@ InspIRCd::InspIRCd(int argc, char** argv)
        SE = SEF->Create(this);
        delete SEF;
 
+
+       ThreadEngineFactory* tef = new ThreadEngineFactory();
+       this->Threads = tef->Create(this);
+       delete tef;
+
        this->s_signal = 0;
        
        // Create base manager classes early, so nothing breaks
@@ -477,15 +482,15 @@ InspIRCd::InspIRCd(int argc, char** argv)
 
        SE->RecoverFromFork();
 
-       /* Read config, pass 0. At the end if this pass,
-        * the Config->IncludeFiles is populated, we call
-        * Config->StartDownloads to initialize the downlaods of all
-        * these files.
+       /* During startup we don't actually initialize this
+        * in the thread engine.
         */
-       Config->Read(true, NULL, 0);
-       Config->DoDownloads();
-       /* We have all the files we can get, initiate pass 1 */
-       Config->Read(true, NULL, 1);
+       this->ConfigThread = new ConfigReaderThread(this, true, NULL);
+       ConfigThread->Run();
+       delete ConfigThread;
+       this->ConfigThread = NULL;
+
+       this->Res = new DNS(this);
 
        this->AddServerName(Config->ServerName);
 
@@ -530,18 +535,18 @@ InspIRCd::InspIRCd(int argc, char** argv)
 
        printf("\n");
 
-       /*this->Modules->LoadAll();*/
+       this->Modules->LoadAll();
        
        /* Just in case no modules were loaded - fix for bug #101 */
        this->BuildISupport();
        InitializeDisabledCommands(Config->DisabledCommands, this);
 
-       if ((Config->ports.size() == 0) && (found_ports > 0))
+       /*if ((Config->ports.size() == 0) && (found_ports > 0))
        {
                printf("\nERROR: I couldn't bind any ports! Are you sure you didn't start InspIRCd twice?\n");
                Logs->Log("STARTUP", DEFAULT,"ERROR: I couldn't bind any ports! Something else is bound to those ports!");
                Exit(EXIT_STATUS_BIND);
-       }
+       }*/
 
        if (Config->ports.size() != (unsigned int)found_ports)
        {