]>
jfr.im git - irc/quakenet/newserv.git/blob - authdump/authdump.c
3 #include "../core/schedule.h"
4 #include "../authext/authext.h"
5 #include "../nick/nick.h"
6 #include "../lib/version.h"
10 static void *authdumpsched
;
12 static void doauthdump(void *arg
) {
16 FILE *fp
= fopen("authdump/authdump.txt.1", "w");
21 for(i
=0;i
<AUTHNAMEHASHSIZE
;i
++) {
22 for(a
=authnametable
[i
];a
;a
=a
->next
) {
27 /* grossly inefficient */
28 fprintf(fp
, "%s %lu", np
->authname
, np
->auth
->userid
);
29 for(;np
;np
=np
->nextbyauthname
)
30 fprintf(fp
, " %s", np
->nick
);
38 rename("authdump/authdump.txt.1", "authdump/authdump.txt");
42 authdumpsched
= (void *)schedulerecurring(time(NULL
), 0, 300, &doauthdump
, NULL
);
46 deleteschedule(authdumpsched
, &doauthdump
, NULL
);