diff options
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/users.cpp b/src/users.cpp index 99377a224..5e7828d5b 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -861,6 +861,9 @@ void userrec::AddToWhoWas() void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, int socketfamily, sockaddr* ip) { userrec* New = new userrec(Instance); + int j = 0; + + Instance->unregistered_count++; user_hash::iterator iter = Instance->clientlist->find(New->uuid); char ipaddr[MAXBUF]; @@ -870,12 +873,8 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, else #endif inet_ntop(AF_INET, &((const sockaddr_in*)ip)->sin_addr, ipaddr, sizeof(ipaddr)); - userrec* New; - int j = 0; - - Instance->unregistered_count++; - (*(Instance->clientlist))[user->uuid] = New; + (*(Instance->clientlist))[New->uuid] = New; New->fd = socket; strlcpy(New->nick, New->uuid, NICKMAX - 1); |