]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/s_newconf.c
Make the epoll check work more reliably.
[irc/rqf/shadowircd.git] / src / s_newconf.c
index dc0474d56a5c4f96001297fd058a625e34a45a4a..c5300b61a0e3e54d126105d322671761fb2b0d23 100644 (file)
@@ -48,6 +48,7 @@
 #include "balloc.h"
 #include "event.h"
 #include "sprintf_irc.h"
+#include "irc_dictionary.h"
 
 dlink_list shared_conf_list;
 dlink_list cluster_conf_list;
@@ -744,13 +745,12 @@ get_nd_count(void)
        return(dlink_list_length(&nd_list));
 }
 
-
 void
 add_nd_entry(const char *name)
 {
        struct nd_entry *nd;
 
-       if(hash_find_nd(name) != NULL)
+       if(irc_dictionary_find(nd_dict, name) != NULL)
                return;
 
        nd = BlockHeapAlloc(nd_heap);
@@ -760,14 +760,16 @@ add_nd_entry(const char *name)
 
        /* this list is ordered */
        dlinkAddTail(nd, &nd->lnode, &nd_list);
-       add_to_nd_hash(name, nd);
+
+       irc_dictionary_add(nd_dict, nd->name, nd);
 }
 
 void
 free_nd_entry(struct nd_entry *nd)
 {
+       irc_dictionary_delete(nd_dict, nd->name);
+
        dlinkDelete(&nd->lnode, &nd_list);
-       dlinkDelete(&nd->hnode, &ndTable[nd->hashv]);
        BlockHeapFree(nd_heap, nd);
 }