summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 11:33:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 11:33:10 +0000
commit09afa5085614e0224a296abd082fce205003c3fe (patch)
tree444d54deea5f10e3045e0a8a016f9623499f513e /src/dns.cpp
parent6d4128715da39b1e097642a64ee0bd40586d9a38 (diff)
ServerConfig extern moved into class InspIRCd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4808 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index cbe56337d..5e6499dc0 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -45,7 +45,6 @@ using namespace std;
/* We need these */
extern InspIRCd* ServerInstance;
-extern ServerConfig* Config;
/* Master file descriptor */
int DNS::MasterSocket;
@@ -258,10 +257,10 @@ DNS::DNS()
memset(&myserver,0,sizeof(insp_inaddr));
/* Convert the nameserver address into an insp_inaddr */
- if (insp_aton(Config->DNSServer,&addr) > 0)
+ if (insp_aton(ServerInstance->Config->DNSServer,&addr) > 0)
{
memcpy(&myserver,&addr,sizeof(insp_inaddr));
- if ((strstr(Config->DNSServer,"::ffff:") == (char*)&Config->DNSServer) || (strstr(Config->DNSServer,"::FFFF:") == (char*)&Config->DNSServer))
+ if ((strstr(ServerInstance->Config->DNSServer,"::ffff:") == (char*)&ServerInstance->Config->DNSServer) || (strstr(ServerInstance->Config->DNSServer,"::FFFF:") == (char*)&ServerInstance->Config->DNSServer))
{
/* These dont come back looking like they did when they went in.
* We're forced to turn some checks off.
@@ -272,11 +271,11 @@ DNS::DNS()
log(DEFAULT," to a true IPv6 environment.");
this->ip6munge = true;
}
- log(DEBUG,"Added nameserver '%s'",Config->DNSServer);
+ log(DEBUG,"Added nameserver '%s'",ServerInstance->Config->DNSServer);
}
else
{
- log(DEBUG,"GACK! insp_aton says the nameserver '%s' is invalid!",Config->DNSServer);
+ log(DEBUG,"GACK! insp_aton says the nameserver '%s' is invalid!",ServerInstance->Config->DNSServer);
}
/* Initialize mastersocket */
@@ -571,9 +570,9 @@ DNSResult DNS::GetResult()
*/
if (!ip6munge)
{
- if ((port_from != DNS::QUERY_PORT) || (strcasecmp(ipaddr_from, Config->DNSServer)))
+ if ((port_from != DNS::QUERY_PORT) || (strcasecmp(ipaddr_from, ServerInstance->Config->DNSServer)))
{
- log(DEBUG,"port %d is not 53, or %s is not %s",port_from, ipaddr_from, Config->DNSServer);
+ log(DEBUG,"port %d is not 53, or %s is not %s",port_from, ipaddr_from, ServerInstance->Config->DNSServer);
return std::make_pair(-1,"");
}
}