diff options
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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); |