aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-03-18 10:07:55 -0500
committerGravatar Daniel De Graaf2010-08-03 17:32:40 -0400
commitad08b7b00731a306e1942e5d17f107dc46e10238 (patch)
tree6f54a8c537df2eb8ee60d19ed4ae440a740543c4 /src/configreader.cpp
parentPURE_STATIC fixes to use normal <module> tags (diff)
Make /etc/resolv.conf reader slightly less stupid
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 008c58530..48d0477ea 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -176,8 +176,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;
+ }
}
}