From 1c5f6e69bcd9ed9b937d5f5f91283402a1648caf Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 2 Dec 2005 00:32:00 +0000 Subject: Fixed dns lookups git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2098 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dns.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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 { -- cgit v1.2.3