summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 11:30:38 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-27 11:30:38 +0000
commit5626380bc94c4c98f068bee0dac04c96b5f0c380 (patch)
treefd4a88d4d7d3ce1432961fe720212ade1823900b /src
parent0ba4b96bbaf1ef385fda088be6e02f93d1b03904 (diff)
More uuid fixes, and whack some warnings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7874 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-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);