]> jfr.im git - irc/quakenet/newserv.git/blobdiff - authext/authext.h
fix sstring leak if PROXYSCAN_MAIL is false
[irc/quakenet/newserv.git] / authext / authext.h
index ddc09c4f8d789d3be41036bcb204545d7919d187..0e9a7f6f916c72cfdc44401d2fd8e7b134befb26 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __AUTHEXT_H
 #define __AUTHEXT_H
 
+#include "../lib/flags.h"
+
 #define MAXAUTHNAMEEXTS 5
 
 struct nick;
@@ -10,7 +12,9 @@ typedef struct authname {
   int usercount;
   unsigned int marker;
   struct nick *nicks;
-  struct authname *next;
+  struct authname *next, *nextbyname;
+  unsigned int namebucket;
+  flag_t flags;
   /* These are extensions only used by other modules */
   void *exts[MAXAUTHNAMEEXTS];
 } authname;
@@ -20,7 +24,7 @@ typedef struct authname {
 extern authname *authnametable[AUTHNAMEHASHSIZE];
 
 /* Allocators */
-authname *newauthname();
+authname *newauthname(void);
 void freeauthname (authname *hp);
 
 /* EXT management */
@@ -30,10 +34,13 @@ void releaseauthnameext(int index);
 
 /* Actual user commands */
 authname *findauthname(unsigned long userid);
-authname *findorcreateauthname(unsigned long userid);
+authname *findauthnamebyname(const char *name);
+authname *findorcreateauthname(unsigned long userid, const char *name);
 void releaseauthname(authname *anp);
 
 /* Marker */
-unsigned int nextauthnamemarker();
+unsigned int nextauthnamemarker(void);
+
+authname *getauthbyname(const char *name);
 
 #endif