]> jfr.im git - irc/quakenet/newserv.git/blame - authext/authext.h
Large reorganisation of all Makefiles, including new configure script.
[irc/quakenet/newserv.git] / authext / authext.h
CommitLineData
57583275 1#ifndef __AUTHEXT_H
2#define __AUTHEXT_H
3
4#define MAXAUTHNAMEEXTS 5
5
6struct nick;
7
8typedef 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
20extern authname *authnametable[AUTHNAMEHASHSIZE];
21
22/* Allocators */
23authname *newauthname();
24void freeauthname (authname *hp);
25
26/* EXT management */
27int registerauthnameext(const char *name);
28int findauthnameext(const char *name);
29void releaseauthnameext(int index);
30
31/* Actual user commands */
32authname *findauthname(unsigned long userid);
33authname *findorcreateauthname(unsigned long userid);
34void releaseauthname(authname *anp);
35
36/* Marker */
37unsigned int nextauthnamemarker();
38
39#endif