From db484478891923aaddbc73bb2a7cac797eaa0a0b Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 14 Oct 2007 19:28:34 +0000 Subject: Fixed for 1.1 too git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@8191 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 492292e6e..dad47ac1c 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -902,19 +902,6 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, New->dhost[j] = New->host[j] = *temp; New->dhost[j] = New->host[j] = 0; - if (socket > -1) - { - if (!Instance->SE->AddFd(New)) - { - Instance->Log(DEBUG,"ERROR: Could not add new user %s!%s@%s to the socket engine!!!", New->nick, New->ident, New->host); - close(socket); - shutdown(socket,2); - Instance->clientlist->erase(tempnick); - delete New; - return; - } - } - Instance->AddLocalClone(New); Instance->AddGlobalClone(New); @@ -978,6 +965,14 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, } } + if (socket > -1) + { + if (!Instance->SE->AddFd(New)) + { + userrec::QuitUser(Instance, New, "Internal error handling connection"); + } + } + /* NOTE: even if dns lookups are *off*, we still need to display this. * BOPM and other stuff requires it. */ -- cgit v1.3.1-10-gc9f91