Exemple #1
0
void fe_irc_dcc_init(void)
{
	signal_add("dcc connected", (SIGNAL_FUNC) dcc_connected);
	signal_add("dcc rejected", (SIGNAL_FUNC) dcc_rejected);
	signal_add("dcc closed", (SIGNAL_FUNC) dcc_closed);
	signal_add("dcc chat message", (SIGNAL_FUNC) dcc_chat_msg);
	signal_add("dcc ctcp action", (SIGNAL_FUNC) dcc_chat_action);
	signal_add("default dcc ctcp", (SIGNAL_FUNC) dcc_chat_ctcp);
	signal_add("dcc request", (SIGNAL_FUNC) dcc_request);
	signal_add("dcc error connect", (SIGNAL_FUNC) dcc_error_connect);
	signal_add("dcc error file create", (SIGNAL_FUNC) dcc_error_file_create);
	signal_add("dcc error file not found", (SIGNAL_FUNC) dcc_error_file_not_found);
	signal_add("dcc error get not found", (SIGNAL_FUNC) dcc_error_get_not_found);
	signal_add("dcc error send exists", (SIGNAL_FUNC) dcc_error_send_exists);
	signal_add("dcc error unknown type", (SIGNAL_FUNC) dcc_error_unknown_type);
	signal_add("dcc error close not found", (SIGNAL_FUNC) dcc_error_close_not_found);
	signal_add("dcc unknown ctcp", (SIGNAL_FUNC) dcc_unknown_ctcp);
	signal_add("dcc unknown reply", (SIGNAL_FUNC) dcc_unknown_reply);
	signal_add("dcc destroyed", (SIGNAL_FUNC) sig_dcc_destroyed);
	signal_add("query destroyed", (SIGNAL_FUNC) sig_query_destroyed);
	signal_add("complete command dcc send", (SIGNAL_FUNC) sig_dcc_send_complete);
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);
	command_bind("msg", NULL, (SIGNAL_FUNC) cmd_msg);
	command_bind("me", NULL, (SIGNAL_FUNC) cmd_me);
	command_bind("action", NULL, (SIGNAL_FUNC) cmd_action);
	command_bind("ctcp", NULL, (SIGNAL_FUNC) cmd_ctcp);
	command_bind("dcc", NULL, (SIGNAL_FUNC) cmd_dcc);
	command_bind("dcc list", NULL, (SIGNAL_FUNC) cmd_dcc_list);

	theme_register(fecommon_irc_dcc_formats);
	read_settings();
}
Exemple #2
0
void fe_common_irc_init(void)
{
	settings_add_bool("lookandfeel", "show_away_once", TRUE);

	theme_register(fecommon_irc_formats);

	fe_irc_channels_init();
	fe_irc_queries_init();
	fe_irc_messages_init();
	fe_irc_commands_init();
	fe_ircnet_init();
	fe_irc_server_init();
	fe_ctcp_init();
	fe_events_init();
	fe_events_numeric_init();
	fe_modes_init();
	fe_netsplit_init();
	fe_netjoin_init();
        fe_whois_init();
	fe_sasl_init();
        irc_completion_init();

	settings_check();
	module_register("core", "fe-irc");

	fe_irc_modules_init();
}
Exemple #3
0
void fe_irc_notifylist_init(void)
{
	theme_register(fecommon_irc_notifylist_formats);

	command_bind("notify", NULL, (SIGNAL_FUNC) cmd_notify);
	signal_add("notifylist joined", (SIGNAL_FUNC) notifylist_joined);
	signal_add("notifylist left", (SIGNAL_FUNC) notifylist_left);
	signal_add("notifylist away changed", (SIGNAL_FUNC) notifylist_away);
	signal_add("notifylist unidle", (SIGNAL_FUNC) notifylist_unidle);
}
Exemple #4
0
void fe_icq_init(void)
{
	theme_register(fecommon_icq_formats);

	signal_add("nick mode change", (SIGNAL_FUNC) nick_modechange);
	signal_add("nick unknown", (SIGNAL_FUNC) nick_unknown);
	signal_add("server add fill", (SIGNAL_FUNC) sig_server_add_fill);

	command_bind_icq("whois", NULL, (SIGNAL_FUNC) cmd_whois);

	command_set_options("server add", "-icqnet");
	module_register("icq", "fe");
}
Exemple #5
0
void fe_irc_dcc_init(void)
{
    fe_dcc_chat_init();
    fe_dcc_get_init();
    fe_dcc_send_init();

    signal_add("dcc request", (SIGNAL_FUNC) dcc_request);
    signal_add("dcc rejected", (SIGNAL_FUNC) dcc_rejected);
    signal_add("dcc request send", (SIGNAL_FUNC) dcc_request_send);
    signal_add("dcc error connect", (SIGNAL_FUNC) dcc_error_connect);
    signal_add("dcc error unknown type", (SIGNAL_FUNC) dcc_error_unknown_type);
    command_bind("dcc", NULL, (SIGNAL_FUNC) cmd_dcc);
    command_bind("dcc list", NULL, (SIGNAL_FUNC) cmd_dcc_list);

    theme_register(fecommon_irc_dcc_formats);
    module_register("dcc", "fe-irc");
}
Exemple #6
0
static void textui_init(void)
{
	static struct poptOption options[] = {
		POPT_AUTOHELP
		{ NULL, '\0', 0, NULL }
	};

	args_register(options);

	irssi_gui = IRSSI_GUI_TEXT;
	core_init();
	irc_init();
	fe_common_core_init();
	fe_common_irc_init();

        theme_register(gui_text_formats);
	signal_add("gui exit", (SIGNAL_FUNC) sig_exit);
}
Exemple #7
0
void fe_common_irc_init(void)
{
	static struct poptOption options[] = {
		{ "connect", 'c', POPT_ARG_STRING, &autocon_server, 0, N_("Automatically connect to server/ircnet"), N_("SERVER") },
		{ "password", 'w', POPT_ARG_STRING, &autocon_password, 0, N_("Autoconnect password"), N_("SERVER") },
		{ "port", 'p', POPT_ARG_INT, &autocon_port, 0, N_("Autoconnect port"), N_("PORT") },
		{ "noconnect", '!', POPT_ARG_NONE, &no_autoconnect, 0, N_("Disable autoconnecting"), NULL },
		{ "nick", 'n', POPT_ARG_STRING, &cmdline_nick, 0, N_("Specify nick to use"), NULL },
		{ "hostname", 'h', POPT_ARG_STRING, &cmdline_hostname, 0, N_("Specify host name to use"), NULL },
		{ NULL, '\0', 0, NULL }
	};

	autocon_server = NULL;
	autocon_password = NULL;
	autocon_port = 6667;
	no_autoconnect = FALSE;
	cmdline_nick = NULL;
	cmdline_hostname = NULL;
	args_register(options);

	settings_add_str("lookandfeel", "beep_on_msg", "");
	settings_add_bool("lookandfeel", "beep_when_away", TRUE);
	settings_add_bool("lookandfeel", "show_away_once", TRUE);
	settings_add_bool("lookandfeel", "show_quit_once", FALSE);

	theme_register(fecommon_irc_formats);

	fe_channels_init();
	fe_irc_commands_init();
	fe_ircnet_init();
	fe_irc_server_init();
	fe_ctcp_init();
	fe_events_init();
	fe_events_numeric_init();
	fe_ignore_init();
	fe_netsplit_init();
	fe_query_init();
	irc_completion_init();
	irc_hilight_text_init();
	irc_window_activity_init();

	fe_irc_modules_init();
}
Exemple #8
0
void fe_perl_init(void)
{
	theme_register(feperl_formats);

	command_bind("script", NULL, (SIGNAL_FUNC) cmd_script);
	command_bind("script exec", NULL, (SIGNAL_FUNC) cmd_script_exec);
	command_bind("script load", NULL, (SIGNAL_FUNC) cmd_script_load);
	command_bind("script unload", NULL, (SIGNAL_FUNC) cmd_script_unload);
	command_bind("script reset", NULL, (SIGNAL_FUNC) cmd_script_reset);
	command_bind("script list", NULL, (SIGNAL_FUNC) cmd_script_list);
	command_bind("load", NULL, (SIGNAL_FUNC) cmd_load);
	command_set_options("script exec", "permanent");

        signal_add("script error", (SIGNAL_FUNC) sig_script_error);
	signal_add("complete command script load", (SIGNAL_FUNC) sig_complete_load);
	signal_add("complete command script unload", (SIGNAL_FUNC) sig_complete_unload);

        perl_core_print_script_error(FALSE);
	module_register("perl", "fe");
}
Exemple #9
0
static void textui_init(void)
{
#ifdef SIGTRAP
	struct sigaction act;

	sigemptyset(&act.sa_mask);
	act.sa_flags = 0;
	act.sa_handler = SIG_IGN;
	sigaction(SIGTRAP, &act, NULL);
#endif

	irssi_gui = IRSSI_GUI_TEXT;
	core_init();
	irc_init();
	fe_common_core_init();
	fe_common_irc_init();

	theme_register(gui_text_formats);
	signal_add_last("gui exit", (SIGNAL_FUNC) sig_exit);
}
Exemple #10
0
void fe_common_core_init(void)
{
	/*settings_add_bool("lookandfeel", "show_menubar", TRUE);
	settings_add_bool("lookandfeel", "show_toolbar", FALSE);
	settings_add_bool("lookandfeel", "show_statusbar", TRUE);
	settings_add_bool("lookandfeel", "show_nicklist", TRUE);*/
	settings_add_bool("lookandfeel", "timestamps", TRUE);
	settings_add_bool("lookandfeel", "msgs_timestamps", FALSE);
	settings_add_bool("lookandfeel", "hide_text_style", FALSE);
	settings_add_bool("lookandfeel", "bell_beeps", FALSE);
	settings_add_bool("lookandfeel", "show_nickmode", TRUE);

	settings_add_bool("lookandfeel", "use_status_window", FALSE);
	settings_add_bool("lookandfeel", "use_msgs_window", FALSE);
	/*settings_add_bool("lookandfeel", "autoraise_msgs_window", FALSE);*/
	/*settings_add_bool("lookandfeel", "use_tabbed_windows", TRUE);
	settings_add_int("lookandfeel", "tab_orientation", 3);*/
	settings_add_str("lookandfeel", "current_theme", "default");

	themes_init();
        theme_register(fecommon_core_formats);

	autorun_init();
	hilight_text_init();
	command_history_init();
	keyboard_init();
	printtext_init();
	fe_log_init();
	fe_server_init();
	fe_settings_init();
	translation_init();
	windows_init();
	window_activity_init();
	window_commands_init();
	window_items_init();
	fe_core_commands_init();
}
Exemple #11
0
/*
 * irssi init()
 */
void otr_init(void)
{
	int ret;

	module_register(MODULE_NAME, "core");

	theme_register(otr_formats);

	ret = create_module_dir();
	if (ret < 0) {
		return;
	}

	gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);

	otr_lib_init();

	user_state_global = otr_init_user_state();
	if (!user_state_global) {
		IRSSI_MSG("Unable to allocate user global state");
		return;
	}

	signal_add_first("server sendmsg", (SIGNAL_FUNC) sig_server_sendmsg);
	signal_add_first("message private", (SIGNAL_FUNC) sig_message_private);
	signal_add("query destroyed", (SIGNAL_FUNC) sig_query_destroyed);

	command_bind("otr", NULL, (SIGNAL_FUNC) cmd_otr);
	command_bind_first("quit", NULL, (SIGNAL_FUNC) cmd_quit);
	command_bind_irc_first("me", NULL, (SIGNAL_FUNC) cmd_me);

	statusbar_item_register("otr", NULL, otr_statusbar);
	statusbar_items_redraw("window");

	perl_signal_register("otr event", signal_args_otr_event);
}
void fe_robustirc_init(void) {
    signal_add("server add fill", sig_server_add_fill);
    theme_register(fe_robustirc_formats);
    module_register(MODULE_NAME, "fe");
}
Exemple #13
0
void fe_common_core_init(void)
{
	const char *str;

	settings_add_bool("lookandfeel", "timestamps", TRUE);
	settings_add_level("lookandfeel", "timestamp_level", "ALL");
	settings_add_time("lookandfeel", "timestamp_timeout", "0");

	settings_add_bool("lookandfeel", "bell_beeps", FALSE);
	settings_add_level("lookandfeel", "beep_msg_level", "");
	settings_add_bool("lookandfeel", "beep_when_window_active", TRUE);
	settings_add_bool("lookandfeel", "beep_when_away", TRUE);

	settings_add_bool("lookandfeel", "hide_text_style", FALSE);
	settings_add_bool("lookandfeel", "hide_colors", FALSE);
	settings_add_bool("lookandfeel", "hide_server_tags", FALSE);

	settings_add_bool("lookandfeel", "use_status_window", TRUE);
	settings_add_bool("lookandfeel", "use_msgs_window", FALSE);
	g_get_charset(&str);
	settings_add_str("lookandfeel", "term_charset", str);
	themes_init();
        theme_register(fecommon_core_formats);

	command_history_init();
	completion_init();
	keyboard_init();
	printtext_init();
	formats_init();
#ifndef WIN32
        fe_exec_init();
#endif
        fe_expandos_init();
	fe_help_init();
	fe_ignore_init();
	fe_log_init();
	fe_modules_init();
	fe_server_init();
	fe_settings_init();
	windows_init();
	window_activity_init();
	window_commands_init();
	window_items_init();
	windows_layout_init();
	fe_core_commands_init();

        fe_channels_init();
        fe_queries_init();

	fe_messages_init();
	hilight_text_init();
	fe_ignore_messages_init();
	fe_recode_init();

	settings_check();

        signal_add_first("server connected", (SIGNAL_FUNC) sig_connected);
        signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
        signal_add_first("channel created", (SIGNAL_FUNC) sig_channel_created);
        signal_add_last("channel destroyed", (SIGNAL_FUNC) sig_channel_destroyed);

	module_register("core", "fe");
}
Exemple #14
0
void fe_common_core_init(void)
{
	static struct poptOption options[] = {
		{ "connect", 'c', POPT_ARG_STRING, &autocon_server, 0, N_("Automatically connect to server/ircnet"), N_("SERVER") },
		{ "password", 'w', POPT_ARG_STRING, &autocon_password, 0, N_("Autoconnect password"), N_("SERVER") },
		{ "port", 'p', POPT_ARG_INT, &autocon_port, 0, N_("Autoconnect port"), N_("PORT") },
		{ "noconnect", '!', POPT_ARG_NONE, &no_autoconnect, 0, N_("Disable autoconnecting"), NULL },
		{ "nick", 'n', POPT_ARG_STRING, &cmdline_nick, 0, N_("Specify nick to use"), NULL },
		{ "hostname", 'h', POPT_ARG_STRING, &cmdline_hostname, 0, N_("Specify host name to use"), NULL },
		{ NULL, '\0', 0, NULL }
	};

	autocon_server = NULL;
	autocon_password = NULL;
	autocon_port = 6667;
	no_autoconnect = FALSE;
	cmdline_nick = NULL;
	cmdline_hostname = NULL;
	args_register(options);

	settings_add_bool("lookandfeel", "timestamps", TRUE);
	settings_add_bool("lookandfeel", "msgs_timestamps", FALSE);
	settings_add_bool("lookandfeel", "hide_text_style", FALSE);
	settings_add_bool("lookandfeel", "bell_beeps", FALSE);
	settings_add_bool("lookandfeel", "beep_when_away", TRUE);

	settings_add_bool("lookandfeel", "use_status_window", TRUE);
	settings_add_bool("lookandfeel", "use_msgs_window", FALSE);

	themes_init();
        theme_register(fecommon_core_formats);

	autorun_init();
	command_history_init();
	completion_init();
	hilight_text_init();
	keyboard_init();
	printtext_init();
	formats_init();
#ifndef WIN32
        fe_exec_init();
#endif
        fe_expandos_init();
	fe_help_init();
	fe_ignore_init();
	fe_log_init();
	fe_modules_init();
	fe_server_init();
	fe_settings_init();
	translation_init();
	windows_init();
	window_activity_init();
	window_commands_init();
	window_items_init();
	windows_layout_init();
	fe_core_commands_init();

        fe_channels_init();
        fe_queries_init();

	fe_messages_init();
	fe_ignore_messages_init();

	settings_check();

        signal_add_first("server connected", (SIGNAL_FUNC) sig_connected);
        signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
        signal_add_first("channel created", (SIGNAL_FUNC) sig_channel_created);
        signal_add_last("channel destroyed", (SIGNAL_FUNC) sig_channel_destroyed);
}
Exemple #15
0
void fe_common_core_init(void)
{
	static struct poptOption version_options[] = {
		{ NULL, '\0', POPT_ARG_CALLBACK, (void *)&print_version, '\0', NULL },
		{ "version", 'v', POPT_ARG_NONE, NULL, 0, "Display irssi version" },
		{ NULL, '\0', 0, NULL }
	};

	static struct poptOption options[] = {
		{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, version_options, 0, NULL, NULL },
		POPT_AUTOHELP
		{ "connect", 'c', POPT_ARG_STRING, &autocon_server, 0, "Automatically connect to server/ircnet", "SERVER" },
		{ "password", 'w', POPT_ARG_STRING, &autocon_password, 0, "Autoconnect password", "PASSWORD" },
		{ "port", 'p', POPT_ARG_INT, &autocon_port, 0, "Autoconnect port", "PORT" },
		{ "noconnect", '!', POPT_ARG_NONE, &no_autoconnect, 0, "Disable autoconnecting", NULL },
		{ "nick", 'n', POPT_ARG_STRING, &cmdline_nick, 0, "Specify nick to use", NULL },
		{ "hostname", 'h', POPT_ARG_STRING, &cmdline_hostname, 0, "Specify host name to use", NULL },
		{ NULL, '\0', 0, NULL }
	};

	autocon_server = NULL;
	autocon_password = NULL;
	autocon_port = 0;
	no_autoconnect = FALSE;
	cmdline_nick = NULL;
	cmdline_hostname = NULL;
	args_register(options);

	settings_add_bool("lookandfeel", "timestamps", TRUE);
	settings_add_level("lookandfeel", "timestamp_level", "ALL");
	settings_add_time("lookandfeel", "timestamp_timeout", 0);

	settings_add_bool("lookandfeel", "bell_beeps", FALSE);
	settings_add_level("lookandfeel", "beep_msg_level", "");
	settings_add_bool("lookandfeel", "beep_when_window_active", TRUE);
	settings_add_bool("lookandfeel", "beep_when_away", TRUE);

	settings_add_bool("lookandfeel", "hide_text_style", FALSE);
	settings_add_bool("lookandfeel", "hide_colors", FALSE);
	settings_add_bool("lookandfeel", "hide_server_tags", FALSE);

	settings_add_bool("lookandfeel", "use_status_window", TRUE);
	settings_add_bool("lookandfeel", "use_msgs_window", FALSE);

	themes_init();
        theme_register(fecommon_core_formats);

	command_history_init();
	completion_init();
	keyboard_init();
	printtext_init();
	formats_init();
#ifndef WIN32
        fe_exec_init();
#endif
        fe_expandos_init();
	fe_help_init();
	fe_ignore_init();
	fe_log_init();
	fe_modules_init();
	fe_server_init();
	fe_settings_init();
	translation_init();
	windows_init();
	window_activity_init();
	window_commands_init();
	window_items_init();
	windows_layout_init();
	fe_core_commands_init();

        fe_channels_init();
        fe_queries_init();

	fe_messages_init();
	hilight_text_init();
	fe_ignore_messages_init();

	settings_check();

        signal_add_first("server connected", (SIGNAL_FUNC) sig_connected);
        signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
        signal_add_first("channel created", (SIGNAL_FUNC) sig_channel_created);
        signal_add_last("channel destroyed", (SIGNAL_FUNC) sig_channel_destroyed);

	module_register("core", "fe");
}