]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Undo my constructor playing, I'm pretty sure it will break stuff. This will require...
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 13 Jan 2008 19:45:28 +0000 (19:45 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 13 Jan 2008 19:45:28 +0000 (19:45 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8707 e03df62e-2008-0410-955e-edbf42e46eb7

src/usermanager.cpp
src/users.cpp

index d518b790efa1c06046ea0f2765426523a2996d78..c980e0eb34a3d926e03a47a27855e2fddadb84d0 100644 (file)
@@ -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);
index 2f1c86a33a62e223f6bd84e0d39e3d56fffc500b..d7671de3c8a5a6496cdb26ec1aaebb145a6ba908 100644 (file)
@@ -210,20 +210,6 @@ User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance
                (*Instance->uuidlist)[uuid] = this;
        else
                throw CoreException("Duplicate UUID "+std::string(uuid)+" in User constructor");
-
-       (*(Instance->clientlist))[this->uuid] = this;
-
-       /* The users default nick is their UUID */
-       strlcpy(this->nick, this->uuid, NICKMAX - 1);
-
-       this->server = Instance->FindServerNamePtr(Instance->Config->ServerName);
-       /* We don't need range checking here, we KNOW 'unknown\0' will fit into the ident field. */
-       strcpy(this->ident, "unknown");
-
-       this->registered = REG_NONE;
-       this->signon = Instance->Time() + Instance->Config->dns_timeout;
-       this->lastping = 1;
-
 }
 
 User::~User()