From 5626380bc94c4c98f068bee0dac04c96b5f0c380 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 27 Aug 2007 11:30:38 +0000 Subject: More uuid fixes, and whack some warnings git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7874 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/users.cpp') 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); -- cgit v1.2.3