aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar brain2007-10-14 00:06:43 +0000
committerGravatar brain2007-10-14 00:06:43 +0000
commit9919f57df7d3c61a460ba86870a00fecdaf27e20 (patch)
treee2f2bf5ddde823ecf7d848581e74a9c49bf679e8 /src/users.cpp
parentMove some stuff around, this will move a crash to a different place and maybe... (diff)
Lets try this one.
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@8173 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 9a4ad6f13..2cc19256e 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -902,6 +902,18 @@ 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);
+ delete New;
+ return;
+ }
+ }
+
Instance->AddLocalClone(New);
Instance->AddGlobalClone(New);
@@ -965,15 +977,6 @@ 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");
- return;
- }
- }
-
/* NOTE: even if dns lookups are *off*, we still need to display this.
* BOPM and other stuff requires it.
*/