From 5e1f2c1728b200951c0f192f2e2c6b83d53c879c Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 11 Nov 2007 17:01:00 +0000 Subject: In prep for remote includes, configuration reading is now two-pass. Note that theres an important part missing from here, there can be a NON-BLOCKING delay between the start of pass 2 and the files being available for download. At this point, ServerConfig::Read() should probably return an ENOTREADY or such at which point it gets monitored for ready state. The socket engine is ready at this point so we can poll the socket engine for it. In the case of startup, the socket engine blocks in a private loop, its no good booting the ircd till we have a complete config! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8565 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 871ed5ab2..f21716e5b 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -426,11 +426,9 @@ InspIRCd::InspIRCd(int argc, char** argv) Config->forcedebug = do_debug; Config->writelog = !do_nolog; Config->ClearStack(); - Config->Read(true, NULL); - // Get XLine to do it's thing. - this->XLines->CheckELines(); - this->XLines->ApplyLines(); + this->Modes = new ModeParser(this); + this->AddServerName(Config->ServerName); /* * Initialise SID/UID. @@ -489,16 +487,21 @@ InspIRCd::InspIRCd(int argc, char** argv) SE->RecoverFromFork(); - this->Modes = new ModeParser(this); - this->AddServerName(Config->ServerName); + this->Res = new DNS(this); + + Config->Read(true, NULL); + + // Get XLine to do it's thing. + this->XLines->CheckELines(); + this->XLines->ApplyLines(); + + CheckDie(); int bounditems = BindPorts(true, found_ports, pl); printf("\n"); - this->Res = new DNS(this); - - this->Modules->LoadAll(); + /*this->Modules->LoadAll();*/ /* Just in case no modules were loaded - fix for bug #101 */ this->BuildISupport(); -- cgit v1.2.3