From 05e88fcd544e3cc22cfdd080a829cf835531d6ee Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 11 Nov 2007 17:53:57 +0000 Subject: Begin rethink on this. Warning, this WILL break your ircd if youre using trunk! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8566 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index f21716e5b..e6d453ed2 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -489,7 +489,26 @@ InspIRCd::InspIRCd(int argc, char** argv) this->Res = new DNS(this); - Config->Read(true, NULL); + /* 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. + */ + Config->Read(true, NULL, 0); + Config->StartDownloads(); + + /* Now the downloads are started, we monitor them for completion. + * On completion, we call Read again with pass = 1 + */ + + while (Config->Downloading()) + { + SE->DispatchEvents(); + this->BufferedSocketCull(); + } + + /* We have all the files we can get, initiate pass 1 */ + Config->Read(true, NULL, 1); // Get XLine to do it's thing. this->XLines->CheckELines(); -- cgit v1.3.1-10-gc9f91