diff options
-rw-r--r-- | src/configreader.cpp | 2 | ||||
-rw-r--r-- | src/dns.cpp | 2 | ||||
-rw-r--r-- | src/inspircd.cpp | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index ca8be9fef..06513253c 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -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(); diff --git a/src/dns.cpp b/src/dns.cpp index 8a274577e..1918053b5 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -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,':')) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 12a9bf756..1aa7c45a5 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -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 |