]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/class.c
Fix inconsistency between --sysconfdir and --with-confdir, deprecate --with-confdir.
[irc/rqf/shadowircd.git] / src / class.c
index cccb8de09500e7ad73b294fae38a709761b98ac0..59981584510d1b4a3f23405a96c292082b634cc9 100644 (file)
@@ -21,7 +21,6 @@
  *  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"
@@ -35,7 +34,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
 rb_dlink_list class_list;
 struct Class *default_class;
 
-struct Class *\r
-make_class(void)\r
-{\r
-       struct Class *tmp;\r
-\r
-       tmp = rb_malloc(sizeof(struct Class));\r
-\r
-       ConFreq(tmp) = DEFAULT_CONNECTFREQUENCY;\r
-       PingFreq(tmp) = DEFAULT_PINGFREQUENCY;\r
-       MaxUsers(tmp) = 1;\r
-       MaxSendq(tmp) = DEFAULT_SENDQ;\r
-\r
-       tmp->ip_limits = rb_new_patricia(PATRICIA_BITS);\r
-       return tmp;\r
-}\r
-\r
-void\r
-free_class(struct Class *tmp)\r
-{\r
-       if(tmp->ip_limits)\r
-               rb_destroy_patricia(tmp->ip_limits, NULL);\r
-\r
-       rb_free(tmp->class_name);\r
-       rb_free(tmp);\r
-\r
+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);
+
 }
 
 /*
@@ -199,7 +198,8 @@ add_class(struct Class *classptr)
                PingFreq(tmpptr) = PingFreq(classptr);
                MaxSendq(tmpptr) = MaxSendq(classptr);
                ConFreq(tmpptr) = ConFreq(classptr);
-               CidrBitlen(tmpptr) = CidrBitlen(classptr);
+               CidrIpv4Bitlen(tmpptr) = CidrIpv4Bitlen(classptr);
+               CidrIpv6Bitlen(tmpptr) = CidrIpv6Bitlen(classptr);
                CidrAmount(tmpptr) = CidrAmount(classptr);
 
                free_class(classptr);