summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-01 20:49:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-01 20:49:25 +0000
commit75d426ed982e958738d303f6dc4053f833614915 (patch)
tree7421f9b309e476c82aeeb47b5e757076a4b85bc0 /src/users.cpp
parent49611143fcd611f984fee818fea43db955279d70 (diff)
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
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp14
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);