コード例 #1
0
ファイル: plexus.c プロジェクト: danopia/atheme
void _modinit(module_t * m)
{
	MODULE_TRY_REQUEST_DEPENDENCY(m, "protocol/ts6-generic");

	/* Symbol relocation voodoo. */
	introduce_nick = &plexus_introduce_nick;
	ircd_on_login = &plexus_on_login;
	ircd_on_logout = &plexus_on_logout;
	sethost_sts = &plexus_sethost_sts;

	mode_list = plexus_mode_list;
	ignore_mode_list = plexus_ignore_mode_list;
	status_mode_list = plexus_status_mode_list;
	prefix_mode_list = plexus_prefix_mode_list;
	user_mode_list = plexus_user_mode_list;

	ircd = &PleXusIRCd;

	pcommand_delete("UID");
	pcommand_add("UID", m_uid, 11, MSRC_SERVER);

	hook_add_event("nick_group");
	hook_add_nick_group(nick_group);
	hook_add_event("nick_ungroup");
	hook_add_nick_ungroup(nick_ungroup);

	m->mflags = MODTYPE_CORE;

	pmodule_loaded = true;
}
コード例 #2
0
void _modinit(module_t * m)
{
	MODULE_TRY_REQUEST_DEPENDENCY(m, "protocol/charybdis");

	mode_list = chatd_mode_list;
	user_mode_list = chatd_user_mode_list;
	status_mode_list = chatd_status_mode_list;
	prefix_mode_list = chatd_prefix_mode_list;

	wallops_sts = &chatd_wallops_sts;
	ircd_on_login = &chatd_on_login;
	ircd_on_logout = &chatd_on_logout;
	is_valid_host = &chatd_is_valid_hostslash;

	pcommand_delete("NICK");
	pcommand_add("NICK", m_nick, 2, MSRC_USER | MSRC_SERVER);
	pcommand_delete("EUID");
	pcommand_add("EUID", m_euid, 11, MSRC_SERVER);

	ircd = &Chatd;

	hook_add_event("nick_group");
	hook_add_nick_group(nick_group);
	hook_add_event("nick_ungroup");
	hook_add_nick_ungroup(nick_ungroup);

	m->mflags = MODTYPE_CORE;

	pmodule_loaded = true;
}
コード例 #3
0
ファイル: info_lastquit.c プロジェクト: Acidburn0zzz/atheme
void _modinit(module_t *m)
{
	hook_add_event("user_delete_info");
	hook_add_user_delete_info(user_delete_info_hook);

	hook_add_event("user_info");
	hook_add_first_user_info(info_hook);
}
コード例 #4
0
ファイル: setpass.c プロジェクト: Canternet/atheme
void _modinit(module_t *m)
{
	hook_add_event("user_identify");
	hook_add_user_identify(clear_setpass_key);
	hook_add_event("user_info");
	hook_add_user_info(show_setpass);
	service_named_bind_command("nickserv", &ns_setpass);
}
コード例 #5
0
void _modinit(module_t *m)
{
    // register a handler function for when a user posts a message in a channel
    hook_add_event("channel_message");
    hook_add_channel_message(on_channel_message);

    // register a handler function for when a user joins a channel
    hook_add_event("channel_join");
    hook_add_channel_join(on_channel_join);
}
コード例 #6
0
ファイル: main.c プロジェクト: danopia/atheme
void _modinit(module_t *m)
{
        hook_add_event("config_ready");
        hook_add_config_ready(nickserv_config_ready);

        hook_add_event("nick_check");
        hook_add_nick_check(nickserv_handle_nickchange);

	nicksvs.me = service_add("nickserv", nickserv, &ns_cmdtree, &conf_ni_table);
	authservice_loaded++;
}
コード例 #7
0
void
_modinit(module_t *m)
{

	hook_add_event("user_can_register");
	hook_add_user_can_register(waitreg_hook);

	hook_add_event("operserv_info");
	hook_add_operserv_info(info_hook);

	add_uint_conf_item("WAITREG_TIME", &nicksvs.me->conf_table, 0, &waitreg_time, 0, INT_MAX, 0);
}
コード例 #8
0
ファイル: main.c プロジェクト: Gryllida/atheme
void _modinit(module_t *m)
{
	hook_add_event("user_identify");
	hook_add_user_identify(on_user_identify);

	hook_add_event("user_away");
	hook_add_user_away(on_user_away);

	memosvs = service_add("memoserv", NULL);

	add_uint_conf_item("MAXMEMOS", &memosvs->conf_table, 0, &maxmemos, 1, INT_MAX, 30);
}
コード例 #9
0
ファイル: main.c プロジェクト: ChatLounge/ChatServices
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);
}
コード例 #10
0
ファイル: on_db_save.c プロジェクト: Cloudxtreme/atheme-6.0
void _modinit(module_t *m)
{
	hook_add_event("db_saved");
	hook_add_db_saved(on_db_save);

	add_dupstr_conf_item("db_update_command", &conf_gi_table, 0, &command, NULL);
}
コード例 #11
0
ファイル: main.c プロジェクト: Wollino/Xtheme
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);
}
コード例 #12
0
ファイル: atheme.c プロジェクト: ballock/atheme
void atheme_setup(void)
{
#if HAVE_UMASK
	/* file creation mask */
	umask(077);
#endif

	base_eventloop = mowgli_eventloop_create();
        hooks_init();
	db_init();

	init_resolver();

	translation_init();
#ifdef ENABLE_NLS
	language_init();
#endif
	init_nodes();
	init_confprocess();
	init_newconf();
	servtree_init();

	hook_add_event("email_canonicalize");
	hook_add_email_canonicalize(canonicalize_email_case);
	/* No need for canonicalize_emails(), no accounts exist yet. */

	modules_init();
	pcommand_init();

	authcookie_init();
	common_ctcp_init();
}
コード例 #13
0
ファイル: main.c プロジェクト: Cloudxtreme/atheme-6.0
void _modinit(module_t *m)
{
	hook_add_event("user_identify");
	hook_add_user_identify(on_user_identify);

	hostsvs = service_add("hostserv", NULL, &conf_hs_table);
}
コード例 #14
0
ファイル: restrict.c プロジェクト: Rixcho/atheme
void _modinit(module_t *m)
{
	service_named_bind_command("nickserv", &ns_restrict);

	hook_add_event("user_info");
	hook_add_user_info(info_hook);
}
コード例 #15
0
ファイル: vacation.c プロジェクト: Cloudxtreme/atheme-6.0
void _modinit(module_t *m)
{
	service_named_bind_command("nickserv", &ns_vacation);

	hook_add_event("user_identify");
	hook_add_user_identify(user_identify_hook);

	hook_add_event("user_check_expire");
	hook_add_user_check_expire(user_expiry_hook);

	hook_add_event("nick_check_expire");
	hook_add_nick_check_expire(nick_expiry_hook);

	hook_add_event("user_info");
	hook_add_user_info(info_hook);
}
コード例 #16
0
ファイル: connavg.c プロジェクト: alyx/atheme-defender
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);
}
コード例 #17
0
ファイル: set_fantasy.c プロジェクト: Gryllida/atheme
void _modinit(module_t *m)
{
	MODULE_TRY_REQUEST_SYMBOL(m, cs_set_cmdtree, "chanserv/set_core", "cs_set_cmdtree");

	command_add(&cs_set_fantasy, *cs_set_cmdtree);

	hook_add_event("config_ready");
	hook_add_config_ready(cs_set_fantasy_config_ready);
}
コード例 #18
0
ファイル: ns_waitreg.c プロジェクト: Cloudxtreme/atheme-6.0
void
_modinit(module_t *m)
{

	hook_add_event("user_can_register");
	hook_add_user_can_register(waitreg_hook);

	add_uint_conf_item("WAITREG_TIME", &conf_ni_table, 0, &waitreg_time, 0, INT_MAX, 0);
}
コード例 #19
0
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);
}
コード例 #20
0
ファイル: main.c プロジェクト: BackupTheBerlios/phoenixfn-svn
void _modinit(module_t *m)
{
        hook_add_event("config_ready");
        hook_add_hook("config_ready", operserv_config_ready);

        if (!cold_start)
        {
                opersvs.me = add_service(opersvs.nick, opersvs.user,
                        opersvs.host, opersvs.real, oservice);
                opersvs.disp = opersvs.me->disp;
        }
}
コード例 #21
0
ファイル: main.c プロジェクト: BackupTheBerlios/phoenixfn-svn
void _modinit(module_t *m)
{
        hook_add_event("config_ready");
        hook_add_hook("config_ready", userserv_config_ready);

        if (!cold_start)
        {
                usersvs.me = add_service(usersvs.nick, usersvs.user,
			usersvs.host, usersvs.real, userserv);
                usersvs.disp = usersvs.me->disp;
        }
	authservice_loaded++;
}
コード例 #22
0
ファイル: main.c プロジェクト: danopia/atheme
void _modinit(module_t *m)
{
    MODULE_USE_SYMBOL(httpd_path_handlers, "misc/httpd", "httpd_path_handlers");

    hook_add_event("config_ready");
    hook_add_config_ready(xmlrpc_config_ready);

    xmlrpc_config.path = sstrdup("/xmlrpc");

    add_subblock_top_conf("XMLRPC", &conf_xmlrpc_table);
    add_dupstr_conf_item("PATH", &conf_xmlrpc_table, &xmlrpc_config.path);

    xmlrpc_set_buffer(dump_buffer);
    xmlrpc_set_options(XMLRPC_HTTP_HEADER, XMLRPC_OFF);
    xmlrpc_register_method("atheme.login", xmlrpcmethod_login);
    xmlrpc_register_method("atheme.logout", xmlrpcmethod_logout);
    xmlrpc_register_method("atheme.command", xmlrpcmethod_command);
}
コード例 #23
0
ファイル: restrict.c プロジェクト: Gryllida/atheme
void _modinit(module_t *m)
{
	service_named_bind_command("nickserv", &ns_restrict);

	hook_add_event("user_info");
	hook_add_user_info(info_hook);

	use_nslist_main_symbols(m);

	static list_param_t restricted;
	restricted.opttype = OPT_BOOL;
	restricted.is_match = is_restricted;

	static list_param_t restrict_match;
	restrict_match.opttype = OPT_STRING;
	restrict_match.is_match = restricted_match;

	list_register("restricted", &restricted);
	list_register("restricted-reason", &restrict_match);
}
コード例 #24
0
ファイル: perl_module.c プロジェクト: Acidburn0zzz/atheme
/*
 * Module startup/shutdown
 */
void _modinit(module_t *m)
{
	perl_script_module_heap = mowgli_heap_create(sizeof(perl_script_module_t), 256, BH_NOW);
	if (!perl_script_module_heap)
	{
		m->mflags |= MODTYPE_FAIL;
		return;
	}

	if (! startup_perl())
	{
		m->mflags |= MODTYPE_FAIL;
		return;
	}

	service_named_bind_command("operserv", &os_perl);

        hook_add_event("module_load");
        hook_add_module_load(hook_module_load);

	add_top_conf("LOADSCRIPT", conf_loadscript);
}
コード例 #25
0
void _modinit(module_t *m)
{
	hook_add_event("channel_message");
	hook_add_channel_message(on_channel_message);
}
コード例 #26
0
void _modinit(module_t *m)
{
    hook_add_event("user_can_register");
    hook_add_user_can_register(check_registration);
}
コード例 #27
0
ファイル: m_motd.c プロジェクト: BackupTheBerlios/shadowircd
void
_modinit(void)
{
  hook_add_event("doing_motd");
  mod_add_cmd(&motd_msgtab);
}
コード例 #28
0
void _modinit(module_t *m)
{
	hook_add_event("channel_register");
	hook_add_first_channel_register(handle_channel_register);
}
コード例 #29
0
ファイル: m_admin.c プロジェクト: BackupTheBerlios/shadowircd
void
_modinit(void)
{
  hook_add_event("doing_admin");
  mod_add_cmd(&admin_msgtab);
}
コード例 #30
0
void _modinit(module_t *m)
{
	hook_add_event("user_identify");
	hook_add_user_identify(hook_user_identify);
}