summaryrefslogtreecommitdiff
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-13 19:45:28 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-13 19:45:28 +0000
commit2620d1258c6a2c249b9503a7c4a764e26a2da0f3 (patch)
tree025ba30d0f118649db6b01bace1c122198301c39 /src/usermanager.cpp
parentde6bba7882bc53b5a23e4854069d4846616f2001 (diff)
Undo my constructor playing, I'm pretty sure it will break stuff. This will require thinkings.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8707 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r--src/usermanager.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index d518b790e..c980e0eb3 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -49,6 +49,19 @@ void UserManager::AddClient(InspIRCd* Instance, int socket, int port, bool iscac
#endif
inet_ntop(AF_INET, &((const sockaddr_in*)ip)->sin_addr, ipaddr, sizeof(ipaddr));
+ (*(Instance->clientlist))[New->uuid] = New;
+
+ /* The users default nick is their UUID */
+ strlcpy(New->nick, New->uuid, NICKMAX - 1);
+
+ New->server = Instance->FindServerNamePtr(Instance->Config->ServerName);
+ /* We don't need range checking here, we KNOW 'unknown\0' will fit into the ident field. */
+ strcpy(New->ident, "unknown");
+
+ New->registered = REG_NONE;
+ New->signon = Instance->Time() + Instance->Config->dns_timeout;
+ New->lastping = 1;
+
New->SetSockAddr(socketfamily, ipaddr, port);
New->SetFd(socket);