diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-09-27 12:26:51 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-09-27 12:26:51 +0100 |
commit | adca883cc39dee260fa778406a16e42169929157 (patch) | |
tree | 6ee31eed4313315570c0313efa6fc664e02c3aea /net/dns.lua | |
parent | 23d676ee18f898b0db00358a1679bf8e56ef043b (diff) | |
parent | 0adb8201b5befee459eed2c0388d3c035a831ca1 (diff) | |
download | prosody-adca883cc39dee260fa778406a16e42169929157.tar.gz prosody-adca883cc39dee260fa778406a16e42169929157.zip |
Merge with 0.5
Diffstat (limited to 'net/dns.lua')
-rw-r--r-- | net/dns.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua index d6462031..e793c397 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -510,7 +510,7 @@ function resolver:adddefaultnameservers () -- - - - - adddefaultnameservers local resolv_conf = io.open("/etc/resolv.conf"); if resolv_conf then for line in resolv_conf:lines() do - local address = string.match (line, '^%s*nameserver%s+(%d+%.%d+%.%d+%.%d+)%s*$') + local address = line:gsub("#.*$", ""):match('^%s*nameserver%s+(%d+%.%d+%.%d+%.%d+)%s*$') if address then self:addnameserver (address) end end elseif os.getenv("WINDIR") then |