]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/s_newconf.c
Fix some split servers not appearing in oper /map.
[irc/rqf/shadowircd.git] / src / s_newconf.c
index 4b5e1e087bf0df46067b82eb991338dffdeaa1b9..60e85fd4fbaba9c05d71fa8ec22ef54c73206bdb 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;
@@ -330,6 +331,7 @@ static struct oper_flags oper_flagtable[] =
        { OPER_GLINE,           'G', 'g' },
        { OPER_KLINE,           'K', 'k' },
        { OPER_XLINE,           'X', 'x' },
+       { OPER_RESV,            'Q', 'q' },
        { OPER_GLOBKILL,        'O', 'o' },
        { OPER_LOCKILL,         'C', 'c' },
        { OPER_REMOTE,          'R', 'r' },
@@ -342,6 +344,7 @@ static struct oper_flags oper_flagtable[] =
        { OPER_SPY,             'S', 's' },
        { OPER_INVIS,           'P', 'p' },
        { OPER_REMOTEBAN,       'B', 'b' },
+       { OPER_MASSNOTICE,      'M', 'm' },
        { 0,                    '\0', '\0' }
 };
 
@@ -528,6 +531,23 @@ find_xline(const char *gecos, int counter)
        return NULL;
 }
 
+struct ConfItem *
+find_xline_mask(const char *gecos)
+{
+       struct ConfItem *aconf;
+       dlink_node *ptr;
+
+       DLINK_FOREACH(ptr, xline_conf_list.head)
+       {
+               aconf = ptr->data;
+
+               if(!irccmp(aconf->name, gecos))
+                       return aconf;
+       }
+
+       return NULL;
+}
+
 struct ConfItem *
 find_nick_resv(const char *name)
 {
@@ -548,6 +568,23 @@ find_nick_resv(const char *name)
        return NULL;
 }
 
+struct ConfItem *
+find_nick_resv_mask(const char *name)
+{
+       struct ConfItem *aconf;
+       dlink_node *ptr;
+
+       DLINK_FOREACH(ptr, resv_conf_list.head)
+       {
+               aconf = ptr->data;
+
+               if(!irccmp(aconf->name, name))
+                       return aconf;
+       }
+
+       return NULL;
+}
+
 /* clean_resv_nick()
  *
  * inputs      - nick
@@ -710,13 +747,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);
@@ -726,14 +762,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);
 }