From 0234afda2c9899eb8f378b6710ce12c28c546c9c Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 5 Feb 2007 23:13:40 +0000 Subject: [PATCH] Now working in svn: Client connections and port bindings on both ipv4 and ipv6 Server port bindings on both ipv4 and ipv6 Now broken due to this: cloaking (cloaks ipv4 users in an odd way when built as ipv6 enabled) DNS (query fd doesnt init properly) ...probably other stuff. Stay tuned. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6503 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/users.cpp b/src/users.cpp index f47c33011..c3e52c80d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -808,7 +808,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, user_hash::iterator iter = Instance->clientlist->find(tempnick); char ipaddr[MAXBUF]; #ifdef IPV6 - if (socketfamily = AF_INET6) + 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)); @@ -849,7 +849,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, New->signon = Instance->Time() + Instance->Config->dns_timeout; New->lastping = 1; - New->SetSockAddr(AF_FAMILY, ipaddr, port); + New->SetSockAddr(socketfamily, ipaddr, port); /* Smarter than your average bear^H^H^H^Hset of strlcpys. */ for (const char* temp = New->GetIPString(); *temp && j < 64; temp++, j++) -- 2.39.5