aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar brain2007-05-22 20:41:00 +0000
committerGravatar brain2007-05-22 20:41:00 +0000
commit51c06dcf84c255d60c576bd19c0e01048f4c40d5 (patch)
treeace0274821b529779895ab6174afb11b58e0a7db /src/configreader.cpp
parentComment on how we came up with this code, and comment it (diff)
downloadinspircd++-51c06dcf84c255d60c576bd19c0e01048f4c40d5.tar.gz
inspircd++-51c06dcf84c255d60c576bd19c0e01048f4c40d5.tar.bz2
inspircd++-51c06dcf84c255d60c576bd19c0e01048f4c40d5.zip
Add comments as to what its doing
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7117 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 4702ce816..bb22db3b1 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -221,13 +221,16 @@ bool ValidateDnsServer(ServerConfig* conf, const char* tag, const char* value, V
{
if (!*(data.GetString()))
{
+ std::string nameserver;
#ifdef WINDOWS
- data.Set(FindNameServerWin().c_str());
+ conf->GetInstance()->Log(DEFAULT,"WARNING: <dns:server> not defined, attempting to find working server in the registry...");
+ nameserver = FindNameServerWin();
+ data.Set(nameserver.c_str());
+ conf->GetInstance()->Log(DEFAULT,"<dns:server> set to '%s' as first active resolver in registry.", nameserver.c_str());
#else
// attempt to look up their nameserver from /etc/resolv.conf
conf->GetInstance()->Log(DEFAULT,"WARNING: <dns:server> not defined, attempting to find working server in /etc/resolv.conf...");
ifstream resolv("/etc/resolv.conf");
- std::string nameserver;
bool found_server = false;
if (resolv.is_open())