]>
Commit | Line | Data |
---|---|---|
84563ebd | 1 | |
2 | #include "../chanserv.h" | |
3 | #include "authtracker.h" | |
4 | #include "../../core/nsmalloc.h" | |
5 | #include "../../core/hooks.h" | |
6 | #include "../../core/error.h" | |
7 | ||
8 | void _init() { | |
9 | at_finddanglingsessions(); | |
10 | } | |
11 | ||
12 | void _fini() { | |
13 | at_hookfini(); | |
14 | nsfreeall(POOL_AUTHTRACKER); | |
15 | } | |
16 | ||
17 | void at_dbloaded(int hooknum, void *arg) { | |
18 | unsigned int i; | |
19 | nick *np; | |
20 | ||
21 | if (!(chanserv_init_status == CS_INIT_READY)) { | |
22 | registerhook(HOOK_CHANSERV_RUNNING, at_dbloaded); | |
23 | return; | |
24 | } | |
25 | ||
26 | if (hooknum) | |
27 | deregisterhook(HOOK_CHANSERV_RUNNING, at_dbloaded); | |
28 | ||
29 | for (i=0;i<NICKHASHSIZE;i++) { | |
30 | for (np=nicktable[i];np;np=np->next) { | |
31 | at_newnick(0, np); | |
32 | } | |
33 | } | |
34 | ||
35 | Error("authtracker",ERR_INFO,"Authtracker running"); | |
36 | at_flushghosts(); | |
37 | at_hookinit(); | |
38 | } |