summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-02 00:21:31 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-02 00:21:31 +0000
commit8f31ffb7d0216f90d5fc51bb26ae9e238c34385b (patch)
tree8f8d2d3578779bc95eebdeb66509744f7b2d8b1c /src/dns.cpp
parent08511e288a3242b9b9336d306ac197ed5da96749 (diff)
Om's ip is annoying to parse.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2096 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index b5488b960..04aa93b6c 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -717,7 +717,11 @@ std::string DNS::GetResultIP()
}
if (result)
{
- sprintf(r,"%u.%u.%u.%u",result[0],result[1],result[2],result[3]);
+ unsigned long oct1 = (unsigned)result[0];
+ unsigned long oct2 = (unsigned)result[1];
+ unsigned long oct3 = (unsigned)result[2];
+ unsigned long oct4 = (unsigned)result[3];
+ sprintf(r,"%lu.%lu.%lu.%lu",oct1,oct2,oct3,oct4);
return r;
}
else