]> jfr.im git - solanum.git/blobdiff - ircd/s_newconf.c
authd: misc fixes
[solanum.git] / ircd / s_newconf.c
index 4eb34f57c15b76abf790a311035930b4e7d24800..3815f839f1e0c085d7197222ee2b6cf73674cdc5 100644 (file)
@@ -32,7 +32,6 @@
 
 #include "stdinc.h"
 #include "ircd_defs.h"
-#include "common.h"
 #include "s_conf.h"
 #include "s_newconf.h"
 #include "client.h"
@@ -41,8 +40,8 @@
 #include "hostmask.h"
 #include "newconf.h"
 #include "hash.h"
-#include "irc_dictionary.h"
-#include "irc_radixtree.h"
+#include "rb_dictionary.h"
+#include "rb_radixtree.h"
 #include "s_assert.h"
 #include "logger.h"
 #include "dns.h"
@@ -174,7 +173,7 @@ free_remote_conf(struct remote_conf *remote_p)
        rb_free(remote_p);
 }
 
-int
+bool
 find_shared_conf(const char *username, const char *host,
                const char *server, int flags)
 {
@@ -190,13 +189,13 @@ find_shared_conf(const char *username, const char *host,
                   match(shared_p->server, server))
                {
                        if(shared_p->flags & flags)
-                               return YES;
+                               return true;
                        else
-                               return NO;
+                               return false;
                }
        }
 
-       return NO;
+       return false;
 }
 
 void
@@ -305,7 +304,7 @@ find_oper_conf(const char *username, const char *host, const char *locip, const
 
                if(parse_netmask(addr, &ip, &bits) != HM_HOST)
                {
-                       if(ip.ss_family == cip.ss_family &&
+                       if(GET_SS_FAMILY(&ip) == GET_SS_FAMILY(&cip) &&
                           comp_with_mask_sock((struct sockaddr *)&ip, (struct sockaddr *)&cip, bits))
                                return oper_p;
                }
@@ -685,10 +684,9 @@ expire_temp_rxlines(void *unused)
        struct ConfItem *aconf;
        rb_dlink_node *ptr;
        rb_dlink_node *next_ptr;
-       int i;
-       struct irc_radixtree_iteration_state state;
+       rb_radixtree_iteration_state state;
 
-       IRC_RADIXTREE_FOREACH(aconf, &state, resv_tree)
+       RB_RADIXTREE_FOREACH(aconf, &state, resv_tree)
        {
                if(aconf->lifetime != 0)
                        continue;
@@ -699,7 +697,7 @@ expire_temp_rxlines(void *unused)
                                                "Temporary RESV for [%s] expired",
                                                aconf->host);
 
-                       irc_radixtree_delete(resv_tree, aconf->host);
+                       rb_radixtree_delete(resv_tree, aconf->host);
                        free_conf(aconf);
                }
        }
@@ -750,7 +748,7 @@ add_nd_entry(const char *name)
 {
        struct nd_entry *nd;
 
-       if(irc_dictionary_find(nd_dict, name) != NULL)
+       if(rb_dictionary_find(nd_dict, name) != NULL)
                return;
 
        nd = rb_bh_alloc(nd_heap);
@@ -761,13 +759,13 @@ add_nd_entry(const char *name)
        /* this list is ordered */
        rb_dlinkAddTail(nd, &nd->lnode, &nd_list);
 
-       irc_dictionary_add(nd_dict, nd->name, nd);
+       rb_dictionary_add(nd_dict, nd->name, nd);
 }
 
 void
 free_nd_entry(struct nd_entry *nd)
 {
-       irc_dictionary_delete(nd_dict, nd->name);
+       rb_dictionary_delete(nd_dict, nd->name);
 
        rb_dlinkDelete(&nd->lnode, &nd_list);
        rb_bh_free(nd_heap, nd);