summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index c2c66fc31..eb6dc5548 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -148,8 +148,11 @@ static void FindDNS(std::string& server)
if (server == "nameserver")
{
resolv >> server;
- ServerInstance->Logs->Log("CONFIG",DEFAULT,"<dns:server> set to '%s' as first resolver in /etc/resolv.conf.",server.c_str());
- return;
+ if (server.find_first_not_of("0123456789.") == std::string::npos)
+ {
+ ServerInstance->Logs->Log("CONFIG",DEFAULT,"<dns:server> set to '%s' as first resolver in /etc/resolv.conf.",server.c_str());
+ return;
+ }
}
}