]>
jfr.im git - irc/quakenet/newserv.git/blob - trusts/trusts.c
2 #include "../core/hooks.h"
5 int trusts_loaddb(void);
6 void trusts_closedb(void);
7 static void statusfn(int, void *);
13 registerhook(HOOK_CORE_STATSREQUEST
, statusfn
);
19 deregisterhook(HOOK_CORE_STATSREQUEST
, statusfn
);
22 static void statusfn(int hooknum
, void *arg
) {
25 int groupcount
= 0, hostcount
= 0;
29 for(tg
=tglist
;tg
;tg
=tg
->next
) {
31 for(th
=tg
->hosts
;th
;th
=th
->next
)
35 snprintf(message
, sizeof(message
), "Trusts : %d trust groups, %d hosts", groupcount
, hostcount
);
36 triggerhook(HOOK_CORE_STATSREPLY
, message
);