This fixed. Initialise dns at the end of pass 1 before loading first set of modules

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8582 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2007-11-11 20:35:54 +00:00
parent ed94fb6c55
commit 8f0f9654f8
3 changed files with 5 additions and 3 deletions

View File

@ -1142,6 +1142,8 @@ void ServerConfig::Read(bool bail, User* user, int pass)
* at this point
*/
if (!ServerInstance->Res)
ServerInstance->Res = new DNS(ServerInstance);
/** Note: This is safe, the method checks for user == NULL */
ServerInstance->Parser->SetupCommandTable(user);
ServerInstance->Modules->LoadAll();

View File

@ -338,6 +338,8 @@ void DNS::Rehash()
this->ip6munge = true;
}
printf("dns server: %s\n", ServerInstance->Config->DNSServer);
this->socketfamily = AF_INET;
#ifdef IPV6
if (strchr(ServerInstance->Config->DNSServer,':'))

View File

@ -315,6 +315,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
this->uuidlist = new user_hash();
this->chanlist = new chan_hash();
this->Res = NULL;
this->Config = new ServerConfig(this);
this->SNO = new SnomaskManager(this);
@ -398,7 +399,6 @@ InspIRCd::InspIRCd(int argc, char** argv)
// Set up winsock
WSADATA wsadata;
WSAStartup(MAKEWORD(2,0), &wsadata);
ChangeWindowsSpecificPointers(this);
#endif
strlcpy(Config->MyExecutable,argv[0],MAXBUF);
@ -465,8 +465,6 @@ InspIRCd::InspIRCd(int argc, char** argv)
SE->RecoverFromFork();
this->Res = new DNS(this);
/* 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