From 51c06dcf84c255d60c576bd19c0e01048f4c40d5 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 22 May 2007 20:41:00 +0000 Subject: Add comments as to what its doing git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7117 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 7 +++++-- 1 file 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: not defined, attempting to find working server in the registry..."); + nameserver = FindNameServerWin(); + data.Set(nameserver.c_str()); + conf->GetInstance()->Log(DEFAULT," 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: 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()) -- cgit v1.2.3