void _modinit(module_t *m) { chanfix_persist_record_t *rec = mowgli_global_storage_get("atheme.chanfix.main.persist"); chanfix_gather_init(rec); if (rec != NULL) { free(rec); return; } chanfix = service_add("chanfix", NULL); service_bind_command(chanfix, &cmd_list); service_bind_command(chanfix, &cmd_chanfix); service_bind_command(chanfix, &cmd_scores); service_bind_command(chanfix, &cmd_info); service_bind_command(chanfix, &cmd_help); service_bind_command(chanfix, &cmd_mark); service_bind_command(chanfix, &cmd_nofix); hook_add_event("channel_can_register"); hook_add_channel_can_register(chanfix_can_register); add_bool_conf_item("AUTOFIX", &chanfix->conf_table, 0, &chanfix_do_autofix, false); chanfix_autofix_timer = mowgli_timer_add(base_eventloop, "chanfix_autofix", chanfix_autofix_ev, NULL, 60); }
void _modinit(module_t *m) { hook_add_event("user_identify"); hook_add_user_identify(on_user_identify); hook_add_event("operserv_info"); hook_add_operserv_info(osinfo_hook); hostsvs = service_add("hostserv", NULL); /* Minimum number of days between when users may reuse the HOSTSERV TAKE command to get another vhost. */ add_uint_conf_item("REQUEST_TIME", &hostsvs->conf_table, 0, &hostsvs_req_time, 0, INT_MAX, 60); add_bool_conf_item("LIMIT_FIRST_REQUEST", &hostsvs->conf_table, 0, &hostsvs_limit_first_req, false); }
void _modinit(module_t *m) { mygroups_init(); groupsvs = service_add("groupserv", NULL, &conf_gs_table); add_uint_conf_item("MAXGROUPS", &conf_gs_table, 0, &maxgroups, 0, 65535, 5); add_uint_conf_item("MAXGROUPACS", &conf_gs_table, 0, &maxgroupacs, 0, 65535, 0); add_bool_conf_item("ENABLE_OPEN_GROUPS", &conf_gs_table, 0, &enable_open_groups, false); gs_db_init(); gs_hooks_init(); basecmds_init(); set_init(); }