1 #include "../core/hooks.h"
4 static int commandsregistered;
5 static void registercommands(int hooknum, void *arg) {
8 commandsregistered = 1;
10 /* do init stuff here */
13 static void deregistercommands(int hooknum, void *arg) {
14 if(!commandsregistered)
16 commandsregistered = 0;
18 /* do fini stuff here */
22 registerhook(HOOK_TRUSTS_DB_LOADED, registercommands);
23 registerhook(HOOK_TRUSTS_DB_CLOSED, deregistercommands);
26 registercommands(0, NULL);
30 deregisterhook(HOOK_TRUSTS_DB_LOADED, registercommands);
31 deregisterhook(HOOK_TRUSTS_DB_CLOSED, deregistercommands);
33 deregistercommands(0, NULL);