aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar brain2007-05-30 17:37:13 +0000
committerGravatar brain2007-05-30 17:37:13 +0000
commit2779810ff0d1b66f0fca1a62d6164d70f5c86d06 (patch)
tree101caa8c28e64e6580d6674eb93e8d349673df21 /src/users.cpp
parentFix bug #309 reported by Smartys - QA, please test quickly. Seems okay to me. (diff)
downloadinspircd++-2779810ff0d1b66f0fca1a62d6164d70f5c86d06.tar.gz
inspircd++-2779810ff0d1b66f0fca1a62d6164d70f5c86d06.tar.bz2
inspircd++-2779810ff0d1b66f0fca1a62d6164d70f5c86d06.zip
Apply ipv6 #ifdef tidyup patch from djGrrr, thanks :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7190 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp10
1 files changed, 2 insertions, 8 deletions
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;