diff options
-rw-r--r-- | src/configreader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 35d8bc927..88b8a9af3 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -225,6 +225,11 @@ bool ValidateDnsServer(ServerConfig* conf, const char* tag, const char* value, V #ifdef WINDOWS conf->GetInstance()->Log(DEFAULT,"WARNING: <dns:server> not defined, attempting to find working server in the registry..."); nameserver = FindNameServerWin(); + /* Windows stacks multiple nameservers in one registry key, seperated by commas. + * Spotted by Cataclysm. + */ + if (nameserver.find(',') != std::string::npos) + nameserver = nameserver.substr(0, nameserver.find(',')); data.Set(nameserver.c_str()); conf->GetInstance()->Log(DEFAULT,"<dns:server> set to '%s' as first active resolver in registry.", nameserver.c_str()); #else |