diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-02 00:32:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-02 00:32:00 +0000 |
commit | 1c5f6e69bcd9ed9b937d5f5f91283402a1648caf (patch) | |
tree | 16d044db6063b199593e7380f3f31d36e14d626b /src/dns.cpp | |
parent | ec0dd17d5ba1a0b3b6f658ab352faa2ff58c866c (diff) |
Fixed dns lookups
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2098 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r-- | src/dns.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index 86bf2b7f2..4a3a0f883 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -717,7 +717,12 @@ std::string DNS::GetResultIP() } if (result) { - return dns_ntoa4_s((in_addr*)&result,r); + unsigned char a = (unsigned)result[0]; + unsigned char b = (unsigned)result[1]; + unsigned char c = (unsigned)result[2]; + unsigned char d = (unsigned)result[3]; + snprintf(r,1024,"%u.%u.%u.%u",a,b,c,d); + return r; } else { |