* 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"
#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;
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;
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);
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;
-}