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/helperfuncs.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index c2a323a7c..2ff939dc6 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -1153,33 +1153,18 @@ int usercount(chanrec *c) // looks up a users password for their connection class (/ tags) -char* Passwd(userrec *user) +ConnectClass* GetClass(userrec *user) { for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++) { - if ((i->type == CC_ALLOW) && match(user->host,i->host.c_str())) + if (match(user->host,i->host.c_str())) { - return (char*)i->pass.c_str(); + return (ConnectClass*)i->second; } } return ""; } -bool IsDenied(userrec *user) -{ - for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++) - { - if ((i->type == CC_DENY) && match(user->host,i->host.c_str())) - { - return true; - } - } - return false; -} - - - - /* sends out an error notice to all connected clients (not to be used * lightly!) */ -- cgit v1.2.3