X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/c945815bf60d0084b553d920022afb0036a3f664..85b8e6497deb6020061522b76afffae6e52573d7:/src/class.c diff --git a/src/class.c b/src/class.c index cccb8de..4b4769e 100644 --- a/src/class.c +++ b/src/class.c @@ -35,7 +35,7 @@ #include "s_conf.h" #include "s_newconf.h" #include "send.h" -#include "irc_string.h" +#include "match.h" #define BAD_CONF_CLASS -1 #define BAD_PING -2 @@ -44,31 +44,31 @@ rb_dlink_list class_list; struct Class *default_class; -struct Class * -make_class(void) -{ - struct Class *tmp; - - tmp = rb_malloc(sizeof(struct Class)); - - ConFreq(tmp) = DEFAULT_CONNECTFREQUENCY; - PingFreq(tmp) = DEFAULT_PINGFREQUENCY; - MaxUsers(tmp) = 1; - MaxSendq(tmp) = DEFAULT_SENDQ; - - tmp->ip_limits = rb_new_patricia(PATRICIA_BITS); - return tmp; -} - -void -free_class(struct Class *tmp) -{ - if(tmp->ip_limits) - rb_destroy_patricia(tmp->ip_limits, NULL); - - rb_free(tmp->class_name); - rb_free(tmp); - +struct Class * +make_class(void) +{ + struct Class *tmp; + + tmp = rb_malloc(sizeof(struct Class)); + + ConFreq(tmp) = DEFAULT_CONNECTFREQUENCY; + PingFreq(tmp) = DEFAULT_PINGFREQUENCY; + MaxUsers(tmp) = 1; + MaxSendq(tmp) = DEFAULT_SENDQ; + + tmp->ip_limits = rb_new_patricia(PATRICIA_BITS); + return tmp; +} + +void +free_class(struct Class *tmp) +{ + if(tmp->ip_limits) + rb_destroy_patricia(tmp->ip_limits, NULL); + + rb_free(tmp->class_name); + rb_free(tmp); + } /*