summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-17 16:40:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-17 16:40:17 +0000
commit89fffcee883763cff9d8d44605a54db1ec22feed (patch)
treef7c788286780a36bbb7761bdb25f3a3597e807d7
parent4426a2fc448f332e42a7e6ff778e5047bb588c98 (diff)
The outer if (socket > -1) check in AddClient is obsolete and this is already checked in socket.cpp. We can remove and just have the inner check.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8730 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/usermanager.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 193262681..1917c780e 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -155,14 +155,11 @@ void UserManager::AddClient(InspIRCd* Instance, int socket, int port, bool iscac
}
}
- if (socket > -1)
- {
- if (!Instance->SE->AddFd(New))
- {
- Instance->Log(DEBUG,"Internal error on new connection");
- User::QuitUser(Instance, New, "Internal error handling connection");
- }
- }
+ if (!Instance->SE->AddFd(New))
+ {
+ Instance->Log(DEBUG,"Internal error on new connection");
+ User::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.
@@ -270,8 +267,8 @@ unsigned int UserManager::UnregisteredUserCount()
/* return how many local registered users there are */
unsigned int UserManager::LocalUserCount()
{
- /* Doesnt count unregistered clients */
- return (ServerInstance->local_users.size() - this->UnregisteredUserCount());
+ /* Doesnt count unregistered clients */
+ return (ServerInstance->local_users.size() - this->UnregisteredUserCount());
}