]>
jfr.im git - irc/quakenet/newserv.git/blob - authext/authext.h
4 #include "../irc/irc_config.h"
5 #include "../lib/flags.h"
6 #include "../lib/ccassert.h"
10 #define MAXAUTHNAMEEXTS 5
12 /* checking to see that u_int64_t == unsigned long long for strtoull */
13 CCASSERT(sizeof(unsigned long long) == sizeof(u_int64_t
))
17 typedef struct authname
{
22 struct authname
*next
, *nextbyname
;
23 unsigned int namebucket
;
25 char name
[ACCOUNTLEN
+1];
26 /* These are extensions only used by other modules */
27 void *exts
[MAXAUTHNAMEEXTS
];
30 #define AUTHNAMEHASHSIZE 60000
32 extern authname
*authnametable
[AUTHNAMEHASHSIZE
];
35 authname
*newauthname(void);
36 void freeauthname (authname
*hp
);
39 int registerauthnameext(const char *name
);
40 int findauthnameext(const char *name
);
41 void releaseauthnameext(int index
);
43 /* Actual user commands */
44 authname
*findauthname(unsigned long userid
);
45 authname
*findauthnamebyname(const char *name
);
46 authname
*findorcreateauthname(unsigned long userid
, const char *name
);
47 void releaseauthname(authname
*anp
);
50 unsigned int nextauthnamemarker(void);
52 authname
*getauthbyname(const char *name
);