diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-22 20:41:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-22 20:41:00 +0000 |
commit | 51c06dcf84c255d60c576bd19c0e01048f4c40d5 (patch) | |
tree | ace0274821b529779895ab6174afb11b58e0a7db | |
parent | 3ee9f47ac1a8a7fd998570adae83de146cb0d4e9 (diff) |
Add comments as to what its doing
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7117 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/configreader.cpp | 7 |
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()) |