From 2779810ff0d1b66f0fca1a62d6164d70f5c86d06 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 30 May 2007 17:37:13 +0000 Subject: Apply ipv6 #ifdef tidyup patch from djGrrr, thanks :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7190 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 906a2e9c3..77642ba04 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -183,14 +183,10 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, bound_user->res_forward = new UserResolver(this->ServerInstance, this->bound_user, result, (!strncmp(ip, "0::ffff:", 8) ? DNS_QUERY_A : DNS_QUERY_AAAA), cached); } else - { /* IPV4 lookup (mixed protocol mode) */ - bound_user->res_forward = new UserResolver(this->ServerInstance, this->bound_user, result, DNS_QUERY_A, cached); - } -#else +#endif /* IPV4 lookup (ipv4 only mode) */ bound_user->res_forward = new UserResolver(this->ServerInstance, this->bound_user, result, DNS_QUERY_A, cached); -#endif this->ServerInstance->AddResolver(bound_user->res_forward, cached); } } @@ -864,10 +860,8 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, if (socketfamily == AF_INET6) inet_ntop(AF_INET6, &((const sockaddr_in6*)ip)->sin6_addr, ipaddr, sizeof(ipaddr)); else - inet_ntop(AF_INET, &((const sockaddr_in*)ip)->sin_addr, ipaddr, sizeof(ipaddr)); -#else - inet_ntop(AF_INET, &((const sockaddr_in*)ip)->sin_addr, ipaddr, sizeof(ipaddr)); #endif + inet_ntop(AF_INET, &((const sockaddr_in*)ip)->sin_addr, ipaddr, sizeof(ipaddr)); userrec* New; int j = 0; -- cgit v1.3.1-10-gc9f91