]> jfr.im git - irc/quakenet/newserv.git/blobdiff - patricianick/patricianick.h
CHANSERV: don't delete the last user/channel to prevent id reuse
[irc/quakenet/newserv.git] / patricianick / patricianick.h
index b168e5cd2242102fe6ab45bea467d25c742dc55d..20867865bb9e9f5defeb7ecb70034bbf836da43a 100644 (file)
@@ -3,12 +3,12 @@
 
 #include "../nick/nick.h"
 
-#define  PNHASHSIZE              1000
-#define  PATRICIANICK_MAXRESULTS 1000
+#define PATRICIANICK_HASHSIZE   5
+#define pn_getidenthash(x)      ((irc_crc32i(x)) % PATRICIANICK_HASHSIZE)
+#define PATRICIANICK_MAXRESULTS 1000
 
-typedef struct patricianick_s {  
-  nick *np;
-  unsigned int marker; /* todo */
+typedef struct patricianick_s {
+  nick *identhash[PATRICIANICK_HASHSIZE];
 } patricianick_t;
 
 extern int pnode_ext;
@@ -18,6 +18,6 @@ void pn_hook_newuser(int hook, void *arg);
 void pn_hook_lostuser(int hook, void *arg);
 
 void addnicktonode(patricia_node_t *node, nick *nick);
-void deletenickfromnode(patricia_node_t *node, nick *nick) ;
+void deletenickfromnode(patricia_node_t *node, nick *nick);
 void freepatricianick(patricianick_t *pnp);
 #endif