From 75d426ed982e958738d303f6dc4053f833614915 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 1 Jan 2006 20:49:25 +0000 Subject: Changes to how classes are looked up (connects slightly faster) and fix for case sensitive passwords git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2723 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index f4075dec4..fd7efb7aa 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -642,16 +642,18 @@ void FullConnectUser(userrec* user, CullList* Goners) user->idle_lastmsg = TIME; log(DEBUG,"ConnectUser: %s",user->nick); - if ((*(Passwd(user))) && (!user->haspassed)) + ConnectClass* a = GetClass(user); + + if (a->type == CC_DENY) + { + Goners->AddItem(user,"Unauthorised connection"); + return; + } + if ((*(a->pass.c_str())) && (!user->haspassed)) { Goners->AddItem(user,"Invalid password"); return; } - if (IsDenied(user)) - { - Goners->AddItem(user,"Unauthorised connection"); - return; - } char match_against[MAXBUF]; snprintf(match_against,MAXBUF,"%s@%s",user->ident,user->host); -- cgit v1.2.3