]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Changed fd_ref_table from 65536 to more correct MAX_DESCRIPTORS
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index c2a323a7c64ea147c4da36d6e44f6fd42c619f80..059f89be632b150382988bff552d91f40f588762 100644 (file)
@@ -56,8 +56,8 @@ extern InspIRCd* ServerInstance;
 extern time_t TIME;
 extern char lowermap[255];
 static char list[MAXBUF];
-extern userrec* fd_ref_table[65536];
-static char already_sent[65536];
+extern userrec* fd_ref_table[MAX_DESCRIPTORS];
+static char already_sent[MAX_DESCRIPTORS];
 extern std::vector<userrec*> all_opers;
 extern user_hash clientlist;
 extern chan_hash chanlist;
@@ -1153,33 +1153,18 @@ int usercount(chanrec *c)
 
 // looks up a users password for their connection class (<ALLOW>/<DENY> 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 *i;
                 }
         }
-        return "";
+        return *(Config->Classes.begin());
 }
 
-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!) */