summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-18 15:14:39 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-18 15:14:39 +0000
commit8590dfa3a02a67a4eb64cbf2febfef270730a816 (patch)
tree7bd96c212c307c169c9be5c7eb1623ef774729c8
parent7cb909b0f3378b7f8f7e2e2fe067685c9e788f6c (diff)
Make /etc/resolv.conf reader slightly less stupid
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12642 e03df62e-2008-0410-955e-edbf42e46eb7
-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;
+ }
}
}