summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-01 18:53:01 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-01 18:53:01 +0000
commitc34dd1e50faa413e35d75191afa2d93aab1e7c76 (patch)
tree5ad48a59e47fe0f5bc74ac8e50a7a2dafdd7f6d6 /src
parent993cff8f399abc6868813b259df88701ad35c6c2 (diff)
No fucking point at all checking for CC_DENY twice. \o/.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7200 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 63edc153e..196be89e9 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1013,20 +1013,12 @@ void userrec::CheckClass()
userrec::QuitUser(ServerInstance, this, "Unauthorised connection");
return;
}
-
- if ((!a->GetPass().empty()) && (!this->haspassed))
+ else if ((!a->GetPass().empty()) && (!this->haspassed))
{
userrec::QuitUser(ServerInstance, this, "Invalid password");
return;
}
-
- if ((!a) || (a->GetType() == CC_DENY))
- {
- userrec::QuitUser(ServerInstance, this,"Unauthorised connection");
- return;
- }
-
- if ((a->GetMaxLocal()) && (this->LocalCloneCount() > a->GetMaxLocal()))
+ else if ((a->GetMaxLocal()) && (this->LocalCloneCount() > a->GetMaxLocal()))
{
userrec::QuitUser(ServerInstance, this, "No more connections allowed from your host via this connect class (local)");
ServerInstance->WriteOpers("*** WARNING: maximum LOCAL connections (%ld) exceeded for IP %s", a->GetMaxLocal(), this->GetIPString());