]> jfr.im git - solanum.git/blobdiff - ircd/class.c
Merge pull request #303 from edk0/modreload-uaf
[solanum.git] / ircd / class.c
index 25a7f53f9f1874df3416ea439c60e99e39ceda6f..71a221d15bb96d83ce23bc42b40236973acfbe54 100644 (file)
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
- *
- *  $Id: class.c 254 2005-09-21 23:35:12Z nenolod $
  */
 
 #include "stdinc.h"
-#include "config.h"
+#include "defaults.h"
 
 #include "class.h"
 #include "client.h"
-#include "common.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "s_conf.h"
@@ -37,9 +34,7 @@
 #include "send.h"
 #include "match.h"
 
-#define BAD_CONF_CLASS          -1
 #define BAD_PING                -2
-#define BAD_CLIENT_CLASS        -3
 
 rb_dlink_list class_list;
 struct Class *default_class;
@@ -55,7 +50,6 @@ make_class(void)
        PingFreq(tmp) = DEFAULT_PINGFREQUENCY;
        MaxUsers(tmp) = 1;
        MaxSendq(tmp) = DEFAULT_SENDQ;
-       MaxSendqHard(tmp) = DEFAULT_SENDQ * 4;
 
        tmp->ip_limits = rb_new_patricia(PATRICIA_BITS);
        return tmp;
@@ -199,7 +193,6 @@ add_class(struct Class *classptr)
                MaxIdent(tmpptr) = MaxIdent(classptr);
                PingFreq(tmpptr) = PingFreq(classptr);
                MaxSendq(tmpptr) = MaxSendq(classptr);
-               MaxSendqHard(tmpptr) = MaxSendq(classptr) * 4;
                ConFreq(tmpptr) = ConFreq(classptr);
                CidrIpv4Bitlen(tmpptr) = CidrIpv4Bitlen(classptr);
                CidrIpv6Bitlen(tmpptr) = CidrIpv6Bitlen(classptr);
@@ -344,33 +337,3 @@ get_sendq(struct Client *client_p)
 
        return DEFAULT_SENDQ;
 }
-
-/*
- * get_sendq_hard
- *
- * inputs      - pointer to client
- * output      - hard sendq limit for this client as found from its class
- * side effects        - NONE
- */
-long
-get_sendq_hard(struct Client *client_p)
-{
-       if(client_p == NULL || IsMe(client_p))
-               return DEFAULT_SENDQ;
-
-       if(IsServer(client_p))
-       {
-               struct server_conf *server_p;
-               server_p = client_p->localClient->att_sconf;
-               return MaxSendqHard(server_p->class);
-       }
-       else
-       {
-               struct ConfItem *aconf = client_p->localClient->att_conf;
-
-               if(aconf != NULL && aconf->status & CONF_CLIENT)
-                       return ConfMaxSendqHard(aconf);
-       }
-
-       return DEFAULT_SENDQ;
-}