]> jfr.im git - irc/quakenet/newserv.git/blob - authext/authext.h
Merge.
[irc/quakenet/newserv.git] / authext / authext.h
1 #ifndef __AUTHEXT_H
2 #define __AUTHEXT_H
3
4 #define MAXAUTHNAMEEXTS 5
5
6 struct nick;
7
8 typedef struct authname {
9 unsigned long userid;
10 int usercount;
11 unsigned int marker;
12 struct nick *nicks;
13 struct authname *next;
14 /* These are extensions only used by other modules */
15 void *exts[MAXAUTHNAMEEXTS];
16 } authname;
17
18 #define AUTHNAMEHASHSIZE 60000
19
20 extern authname *authnametable[AUTHNAMEHASHSIZE];
21
22 /* Allocators */
23 authname *newauthname();
24 void freeauthname (authname *hp);
25
26 /* EXT management */
27 int registerauthnameext(const char *name);
28 int findauthnameext(const char *name);
29 void releaseauthnameext(int index);
30
31 /* Actual user commands */
32 authname *findauthname(unsigned long userid);
33 authname *findorcreateauthname(unsigned long userid);
34 void releaseauthname(authname *anp);
35
36 /* Marker */
37 unsigned int nextauthnamemarker();
38
39 #endif