summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server.cpp1
-rw-r--r--src/users.cpp9
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server.cpp b/src/server.cpp
index ac693adb1..162ffeb20 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -187,6 +187,7 @@ std::string InspIRCd::GetUID()
return std::string(current_uid);
}
}
+ return "";
}
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);