diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-11-01 20:20:11 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-11-01 20:20:11 +0000 |
commit | ab65273f9ff40c0761514d1067b6631ec5a0e422 (patch) | |
tree | 7c2d1f1694c348debff372c440510bc6129d9434 /src/usermanager.cpp | |
parent | 73de881eafbd3d201ce4be472bd35349773d74bd (diff) |
Simulate AF_INET addresses for 4in6 connections [danieldg]
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10779 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r-- | src/usermanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index e526238ed..521dcec41 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -18,7 +18,7 @@ #include "bancache.h" /* add a client connection to the sockets list */ -void UserManager::AddUser(InspIRCd* Instance, int socket, int port, bool iscached, int socketfamily, sockaddr* ip, const std::string &targetip) +void UserManager::AddUser(InspIRCd* Instance, int socket, int port, bool iscached, sockaddr* ip, const std::string &targetip) { /* NOTE: Calling this one parameter constructor for User automatically * allocates a new UUID and places it in the hash_map. @@ -37,14 +37,14 @@ void UserManager::AddUser(InspIRCd* Instance, int socket, int port, bool iscache char ipaddr[MAXBUF]; #ifdef IPV6 - if (socketfamily == AF_INET6) + if (ip->sa_family == AF_INET6) inet_ntop(AF_INET6, &((const sockaddr_in6*)ip)->sin6_addr, ipaddr, sizeof(ipaddr)); else #endif inet_ntop(AF_INET, &((const sockaddr_in*)ip)->sin_addr, ipaddr, sizeof(ipaddr)); New->SetFd(socket); - New->SetSockAddr(socketfamily, ipaddr, port); + New->SetSockAddr(ip->sa_family, ipaddr, port); /* Give each of the modules an attempt to hook the user for I/O */ FOREACH_MOD_I(Instance, I_OnHookUserIO, OnHookUserIO(New, targetip)); |