From c34dd1e50faa413e35d75191afa2d93aab1e7c76 Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 1 Jun 2007 18:53:01 +0000 Subject: [PATCH] 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 --- src/users.cpp | 12 ++---------- 1 file 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()); -- 2.39.5