/* This is called on module init, before Server Ready */ DLLFUNC int MOD_INIT(m_htm)(ModuleInfo *modinfo) { /* * We call our add_Command crap here */ add_Command(MSG_HTM, TOK_HTM, m_htm, MAXPARA); ConfRun = HookAddEx(HtmModInfo->handle, HOOKTYPE_CONFIGRUN, htm_config_run); ServerStats = HookAddEx(HtmModInfo->handle, HOOKTYPE_STATS, htm_stats); #ifndef NO_FDLIST LockEventSystem(); e_lcf = EventAddEx(HtmModInfo->handle, "lcf", LCF, 0, lcf_check, NULL); e_htmcalc = EventAddEx(HtmModInfo->handle, "htmcalc", 1, 0, htm_calc, NULL); UnlockEventSystem(); #endif MARK_AS_OFFICIAL_MODULE(modinfo); return MOD_SUCCESS; }
int channeldumper_Load(int module_load) #endif { LockEventSystem(); ChannelDumpEvent = EventAddEx(ChannelDumperModInfo.handle, "e_channeldump", 5, 0, e_channeldump, NULL); UnlockEventSystem(); return MOD_SUCCESS; }
void SetupEvents(void) { LockEventSystem(); /* Start events */ EventAddEx(NULL, "tunefile", 300, 0, save_tunefile, NULL); EventAddEx(NULL, "garbage", GARBAGE_COLLECT_EVERY, 0, garbage_collect, NULL); EventAddEx(NULL, "loop", 0, 0, loop_event, NULL); EventAddEx(NULL, "unrealdns_removeoldrecords", 15, 0, unrealdns_removeoldrecords, NULL); EventAddEx(NULL, "check_pings", 1, 0, check_pings, NULL); EventAddEx(NULL, "check_deadsockets", 1, 0, check_deadsockets, NULL); EventAddEx(NULL, "check_unknowns", 1, 0, check_unknowns, NULL); EventAddEx(NULL, "try_connections", 2, 0, try_connections, NULL); UnlockEventSystem(); }
void SetupEvents(void) { LockEventSystem(); /* Start events */ EventAddEx(NULL, "tunefile", 300, 0, save_tunefile, NULL); EventAddEx(NULL, "garbage", GARBAGE_COLLECT_EVERY, 0, garbage_collect, NULL); EventAddEx(NULL, "loop", 0, 0, loop_event, NULL); #ifndef NO_FDLIST EventAddEx(NULL, "fdlistcheck", 1, 0, e_check_fdlists, NULL); #endif #ifdef JOINTHROTTLE EventAddEx(NULL, "cmodej_cleanup_structs", 60, 0, cmodej_cleanup_structs, NULL); #endif EventAddEx(NULL, "unrealdns_removeoldrecords", 15, 0, unrealdns_removeoldrecords, NULL); UnlockEventSystem(); }
void init_modef() { EventAddEx(NULL, "modef_event", 10, 0, modef_event, NULL); }