Ejemplo n.º 1
0
void _modinit(module_t *m)
{
    service_named_bind_command("operserv", &os_connavg);
    hook_add_event("user_add");
    hook_add_user_add(connavg_newuser);
    add_uint_conf_item("SAFE_CONNECTIONS", &conf_gi_table, 0, &safe_connections, 1, INT_MAX, 5);
    event_add("reset_connections", reset_connections, NULL, 60);
}
void
_modinit(module_t *m)
{
	add_subblock_top_conf("NICKLISTS", &conft);
	add_conf_item("ALL", &conft, nicklist_config_handler_all);
	add_conf_item("NICK", &conft, nicklist_config_handler_nick);
	add_conf_item("USER", &conft, nicklist_config_handler_user);
	add_conf_item("REAL", &conft, nicklist_config_handler_real);

	akillalllist = mowgli_patricia_create(strcasecanon);
	akillnicklist = mowgli_patricia_create(strcasecanon);
	akilluserlist = mowgli_patricia_create(strcasecanon);
	akillreallist = mowgli_patricia_create(strcasecanon);

	hook_add_event("user_add");
	hook_add_user_add(aknl_nickhook);
	hook_add_event("user_nickchange");
	hook_add_user_nickchange(aknl_nickhook);
}