X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/68876ea24b3d1782d404a39989ad855b328e5304..164b549392766080ea58b2b22607616867f8ecb3:/src/class.c diff --git a/src/class.c b/src/class.c index cccb8de..f3a60e8 100644 --- a/src/class.c +++ b/src/class.c @@ -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); + } /*