summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-11 20:35:54 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-11 20:35:54 +0000
commit8f0f9654f841f8034be4c071660a378a91434782 (patch)
tree178ed3294bfd1005504c72c46baaa64009583bbb
parented94fb6c55eb67919babc51b31c9ef617aeb2157 (diff)
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
-rw-r--r--src/configreader.cpp2
-rw-r--r--src/dns.cpp2
-rw-r--r--src/inspircd.cpp4
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