Exemplo n.º 1
0
void robustirc_core_init(void) {
    CHAT_PROTOCOL_REC *rec;
    rec = g_new0(CHAT_PROTOCOL_REC, 1);
    rec->name = ROBUSTIRC_PROTOCOL_NAME;
    rec->fullname = "RobustIRC";
    rec->chatnet = "robustirc";
    rec->create_chatnet = create_chatnet;
    rec->create_server_setup = create_server_setup;
    rec->create_server_connect = create_server_connect;
    rec->create_channel_setup = create_channel_setup;
    rec->destroy_server_connect =
        (void (*)(SERVER_CONNECT_REC *))destroy_server_connect;
    rec->server_init_connect = robustirc_server_init_connect;
    rec->server_connect = (void (*)(SERVER_REC *))robustirc_server_connect;
    rec->channel_create =
        (CHANNEL_REC * (*)(SERVER_REC *, const char *,
                           const char *, int))
        irc_channel_create;

    rec->query_create = irc_query_create;
    chat_protocol_register(rec);
    g_free(rec);

    command_set_options("connect", "robustirc");

    signal_add_last("server connect copy", (SIGNAL_FUNC)robustirc_server_connect_copy);
    signal_add_last("server disconnected", (SIGNAL_FUNC)robustirc_server_disconnected);

    connrecs = g_hash_table_new(NULL, NULL);

    robustsession_init();

    module_register(MODULE_NAME, "core");
}
Exemplo n.º 2
0
void bot_irc_commands_init(void)
{
	signal_add("event privmsg", (SIGNAL_FUNC) event_privmsg);
	signal_add_last("bot command op", (SIGNAL_FUNC) botcmd_op);
	signal_add_last("bot command ident", (SIGNAL_FUNC) botcmd_ident);
	signal_add_last("bot command pass", (SIGNAL_FUNC) botcmd_pass);
}
Exemplo n.º 3
0
void irc_servers_init(void)
{
	settings_add_str("misc", "usermode", DEFAULT_USER_MODE);
	settings_add_time("flood", "cmd_queue_speed", DEFAULT_CMD_QUEUE_SPEED);
	settings_add_int("flood", "cmds_max_at_once", DEFAULT_CMDS_MAX_AT_ONCE);

	cmd_tag = -1;

	signal_add_first("server connected", (SIGNAL_FUNC) sig_connected);
	signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
	signal_add_last("server quit", (SIGNAL_FUNC) sig_server_quit);
	signal_add("event 001", (SIGNAL_FUNC) event_connected);
	signal_add("event 004", (SIGNAL_FUNC) event_server_info);
	signal_add("event 005", (SIGNAL_FUNC) event_isupport);
	signal_add("event 375", (SIGNAL_FUNC) event_motd);
	signal_add_last("event 376", (SIGNAL_FUNC) event_end_of_motd);
	signal_add_last("event 422", (SIGNAL_FUNC) event_end_of_motd); /* no motd */
	signal_add("event 254", (SIGNAL_FUNC) event_channels_formed);
	signal_add("event 396", (SIGNAL_FUNC) event_hosthidden);
	signal_add("event 465", (SIGNAL_FUNC) event_server_banned);
	signal_add("event error", (SIGNAL_FUNC) event_error);
	signal_add("event ping", (SIGNAL_FUNC) event_ping);
	signal_add("event empty", (SIGNAL_FUNC) event_empty);

	irc_servers_setup_init();
	irc_servers_reconnect_init();
	servers_redirect_init();
	servers_idle_init();
}
Exemplo n.º 4
0
void fe_channels_init(void)
{
	settings_add_bool("lookandfeel", "autoclose_windows", TRUE);
	settings_add_bool("lookandfeel", "show_names_on_join", TRUE);
	settings_add_int("lookandfeel", "names_max_columns", 6);
	settings_add_int("lookandfeel", "names_max_width", 0);

	signal_add("channel created", (SIGNAL_FUNC) signal_channel_created);
	signal_add("channel destroyed", (SIGNAL_FUNC) signal_channel_destroyed);
	signal_add_last("window item changed", (SIGNAL_FUNC) signal_window_item_changed);
	signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
	signal_add_last("channel joined", (SIGNAL_FUNC) sig_channel_joined);

	command_bind_first("join", NULL, (SIGNAL_FUNC) cmd_wjoin_pre);
	command_bind("join", NULL, (SIGNAL_FUNC) cmd_join);
	command_bind_last("join", NULL, (SIGNAL_FUNC) cmd_wjoin_post);
	command_bind("channel", NULL, (SIGNAL_FUNC) cmd_channel);
	command_bind("channel add", NULL, (SIGNAL_FUNC) cmd_channel_add);
	command_bind("channel remove", NULL, (SIGNAL_FUNC) cmd_channel_remove);
	command_bind("channel list", NULL, (SIGNAL_FUNC) cmd_channel_list);
	command_bind("names", NULL, (SIGNAL_FUNC) cmd_names);
	command_bind("cycle", NULL, (SIGNAL_FUNC) cmd_cycle);

	command_set_options("channel add", "auto noauto -bots -botcmd");
	command_set_options("names", "count ops halfops voices normal");
	command_set_options("join", "window");
}
Exemplo n.º 5
0
void
muc_reconnect_init(void)
{
	signal_add_last("server connect copy", sig_conn_copy);
	signal_add("server reconnect remove", sig_conn_remove);
	signal_add("server reconnect save status", sig_save_status);
	signal_add_last("server connected", sig_connected);
}
Exemplo n.º 6
0
void
stanzas_init(void)
{
	signal_add("server connecting", register_stanzas);
	signal_add_first("server disconnected", unregister_stanzas);
	signal_add_last("xmpp send message", send_stanza); 
	signal_add_last("xmpp send presence", send_stanza); 
	signal_add_last("xmpp send iq", send_stanza); 
	signal_add_last("xmpp send others", send_stanza); 
}
Exemplo n.º 7
0
void bot_users_init(void)
{
	users = g_hash_table_new((GHashFunc) g_istr_hash, (GCompareFunc) g_istr_equal);

	last_write = time(NULL);
	writeusers_tag = g_timeout_add(10000, (GSourceFunc) sig_write_users, NULL);

	botuser_config_read();
	signal_add_last("massjoin", (SIGNAL_FUNC) event_massjoin);
	signal_add_last("channel sync", (SIGNAL_FUNC) sig_channel_sync);
	signal_add_last("nicklist remove", (SIGNAL_FUNC) sig_nicklist_remove);
}
Exemplo n.º 8
0
void fe_irc_messages_init(void)
{
        signal_add_last("message own_public", (SIGNAL_FUNC) sig_message_own_public);
        signal_add_last("message irc op_public", (SIGNAL_FUNC) sig_message_irc_op_public);
        signal_add_last("message irc own_wall", (SIGNAL_FUNC) sig_message_own_wall);
        signal_add_last("message irc own_action", (SIGNAL_FUNC) sig_message_own_action);
        signal_add_last("message irc action", (SIGNAL_FUNC) sig_message_irc_action);
        signal_add_last("message irc own_notice", (SIGNAL_FUNC) sig_message_own_notice);
        signal_add_last("message irc notice", (SIGNAL_FUNC) sig_message_irc_notice);
        signal_add_last("message irc own_ctcp", (SIGNAL_FUNC) sig_message_own_ctcp);
        signal_add_last("message irc ctcp", (SIGNAL_FUNC) sig_message_irc_ctcp);
}
Exemplo n.º 9
0
void fe_queries_init(void)
{
	settings_add_str("lookandfeel", "autocreate_query_level", "MSGS DCCMSGS");
	settings_add_bool("lookandfeel", "autocreate_own_query", TRUE);
	settings_add_int("lookandfeel", "autoclose_query", 0);

	queryclose_tag = -1;
	read_settings();

	signal_add("query created", (SIGNAL_FUNC) signal_query_created);
	signal_add("query destroyed", (SIGNAL_FUNC) signal_query_destroyed);
	signal_add("query server changed", (SIGNAL_FUNC) signal_query_server_changed);
	signal_add("query nick changed", (SIGNAL_FUNC) signal_query_nick_changed);
        signal_add("window item server changed", (SIGNAL_FUNC) signal_window_item_server_changed);
	signal_add_last("window item destroy", (SIGNAL_FUNC) signal_window_item_destroy);
	signal_add("server connected", (SIGNAL_FUNC) sig_server_connected);
	signal_add("window changed", (SIGNAL_FUNC) sig_window_changed);
	signal_add_first("message private", (SIGNAL_FUNC) sig_message_private);
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);

	command_bind("query", NULL, (SIGNAL_FUNC) cmd_query);
	command_bind("unquery", NULL, (SIGNAL_FUNC) cmd_unquery);
	command_bind("window server", NULL, (SIGNAL_FUNC) cmd_window_server);

	command_set_options("query", "window");
}
Exemplo n.º 10
0
void
fe_xmpp_queries_init(void)
{
	signal_add("xmpp query raise", sig_query_raise);
	signal_add("xmpp presence changed", sig_presence_changed);
	signal_add_last("query created", sig_query_created);
}
void
xmpp_servers_reconnect_init(void)
{
	signal_add_first("server connect copy", sig_server_connect_copy);
	signal_add("server reconnect save status", sig_save_status);
	signal_add_last("server connected", sig_connected);
}
Exemplo n.º 12
0
void statusbar_items_init(void)
{
	settings_add_time("misc", "lag_min_show", "1sec");
	settings_add_str("lookandfeel", "actlist_sort", "refnum");
	settings_add_bool("lookandfeel", "actlist_names", FALSE);
	settings_add_bool("lookandfeel", "actlist_prefer_window_name", FALSE);

	statusbar_item_register("window", NULL, item_window_active);
	statusbar_item_register("window_empty", NULL, item_window_empty);
	statusbar_item_register("prompt", NULL, item_window_active);
	statusbar_item_register("prompt_empty", NULL, item_window_empty);
	statusbar_item_register("topic", NULL, item_window_active);
	statusbar_item_register("topic_empty", NULL, item_window_empty);
	statusbar_item_register("lag", NULL, item_lag);
	statusbar_item_register("act", NULL, item_act);
	statusbar_item_register("more", NULL, item_more);
	statusbar_item_register("input", NULL, item_input);

        /* activity */
	activity_list = NULL;
	signal_add("window activity", (SIGNAL_FUNC) sig_statusbar_activity_hilight);
	signal_add("window destroyed", (SIGNAL_FUNC) sig_statusbar_activity_window_destroyed);
	signal_add("window refnum changed", (SIGNAL_FUNC) sig_statusbar_activity_updated);

        /* more */
        more_visible = NULL;
	signal_add("gui page scrolled", (SIGNAL_FUNC) sig_statusbar_more_updated);
	signal_add("window changed", (SIGNAL_FUNC) sig_statusbar_more_updated);
	signal_add_last("gui print text finished", (SIGNAL_FUNC) sig_statusbar_more_updated);
	signal_add_last("command clear", (SIGNAL_FUNC) sig_statusbar_more_updated);
	signal_add_last("command scrollback", (SIGNAL_FUNC) sig_statusbar_more_updated);

        /* lag */
	last_lag = 0; last_lag_unknown = FALSE;
	signal_add("server lag", (SIGNAL_FUNC) sig_server_lag_updated);
	signal_add("window changed", (SIGNAL_FUNC) lag_check_update);
	signal_add("window server changed", (SIGNAL_FUNC) lag_check_update);
        lag_timeout_tag = g_timeout_add(5000, (GSourceFunc) sig_lag_timeout, NULL);

        /* input */
	input_entries = g_hash_table_new((GHashFunc) g_str_hash,
					 (GCompareFunc) g_str_equal);

	read_settings();
        signal_add_last("setup changed", (SIGNAL_FUNC) read_settings);
}
Exemplo n.º 13
0
void fe_irc_messages_init(void)
{
	settings_add_bool("misc", "notice_channel_context", TRUE);

        signal_add_last("message own_public", (SIGNAL_FUNC) sig_message_own_public);
        signal_add_last("message irc op_public", (SIGNAL_FUNC) sig_message_irc_op_public);
        signal_add_last("message irc own_wall", (SIGNAL_FUNC) sig_message_own_wall);
        signal_add_last("message irc own_action", (SIGNAL_FUNC) sig_message_own_action);
        signal_add_last("message irc action", (SIGNAL_FUNC) sig_message_irc_action);
        signal_add_last("message irc own_notice", (SIGNAL_FUNC) sig_message_own_notice);
        signal_add_last("message irc notice", (SIGNAL_FUNC) sig_message_irc_notice);
        signal_add_last("message irc own_ctcp", (SIGNAL_FUNC) sig_message_own_ctcp);
        signal_add_last("message irc ctcp", (SIGNAL_FUNC) sig_message_irc_ctcp);
}
Exemplo n.º 14
0
void window_items_init(void)
{
	settings_add_bool("lookandfeel", "reuse_unused_windows", FALSE);
	settings_add_bool("lookandfeel", "autocreate_windows", TRUE);
	settings_add_bool("lookandfeel", "autocreate_split_windows", FALSE);
	settings_add_bool("lookandfeel", "autofocus_new_items", TRUE);

	signal_add_last("window item changed", (SIGNAL_FUNC) signal_window_item_changed);
}
Exemplo n.º 15
0
void netsplit_init(void)
{
	split_tag = g_timeout_add(1000, (GSourceFunc) split_check_old, NULL);
	signal_add_first("event join", (SIGNAL_FUNC) event_join);
	signal_add_last("event join", (SIGNAL_FUNC) event_join_last);
	signal_add_first("event quit", (SIGNAL_FUNC) event_quit);
	signal_add("event nick", (SIGNAL_FUNC) event_nick);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_disconnected);
}
Exemplo n.º 16
0
void dcc_autoget_init(void)
{
	settings_add_bool("dcc", "dcc_autoget", FALSE);
	settings_add_bool("dcc", "dcc_autoaccept_lowports", FALSE);
	settings_add_bool("dcc", "dcc_autoresume", FALSE);
	settings_add_size("dcc", "dcc_autoget_max_size", "0k");
	settings_add_str("dcc", "dcc_autoget_masks", "");

	signal_add_last("dcc request", (SIGNAL_FUNC) sig_dcc_request);
}
Exemplo n.º 17
0
void hilight_text_init(void)
{
	hilight_next = FALSE;
	last_nick_color = 0;

	read_hilight_config();
	settings_add_str("misc", "hilight_color", "8");
	settings_add_bool("misc", "hilight_only_nick", TRUE);

	signal_add_first("print text", (SIGNAL_FUNC) sig_print_text);
	signal_add_first("print text stripped", (SIGNAL_FUNC) sig_print_text_stripped);
        signal_add("setup reread", (SIGNAL_FUNC) read_hilight_config);
	signal_add_last("message public", (SIGNAL_FUNC) sig_message);
	signal_add_last("message private", (SIGNAL_FUNC) sig_message);
	command_bind("hilight", NULL, (SIGNAL_FUNC) cmd_hilight);
	command_bind("dehilight", NULL, (SIGNAL_FUNC) cmd_dehilight);

	command_set_options("hilight", "-color -level -channels nick nonick mask word regexp");
}
Exemplo n.º 18
0
void
fe_composing_init(void)
{
	signal_add_last("window changed", sig_window_changed);
	signal_add("query destroyed", sig_query_destroyed);
	signal_add("server disconnected", sig_disconnected);

	settings_add_bool("xmpp", "xmpp_send_composing", TRUE);
	keylog_active = FALSE;
	last_key = 0;
}
Exemplo n.º 19
0
void
xmpp_servers_init(void)
{
	signal_add_last("server connected", sig_connected);
	signal_add_last("server disconnected", server_cleanup);
	signal_add_last("server connect failed", server_cleanup);
	signal_add("server quit", sig_server_quit);
	signal_add_first("session save", sig_session_save);

	settings_add_int("xmpp", "xmpp_priority", 0);
	settings_add_int("xmpp", "xmpp_priority_away", -1);
	settings_add_bool("xmpp_lookandfeel", "xmpp_set_nick_as_username",
	    FALSE);
	settings_add_bool("xmpp_proxy", "xmpp_use_proxy", FALSE);
	settings_add_str("xmpp_proxy", "xmpp_proxy_type", "http");
	settings_add_str("xmpp_proxy", "xmpp_proxy_address", NULL);
	settings_add_int("xmpp_proxy", "xmpp_proxy_port", 8080);
	settings_add_str("xmpp_proxy", "xmpp_proxy_user", NULL);
	settings_add_str("xmpp_proxy", "xmpp_proxy_password", NULL);
}
Exemplo n.º 20
0
static void
keyloger_enabled(gboolean enable)
{
	if (enable && !keylog_active) {
		signal_add_last("gui key pressed", sig_gui_key_pressed);
		keylog_active = TRUE;
	} else if (!enable && keylog_active) {
		signal_remove("gui key pressed", sig_gui_key_pressed);
		keylog_active = FALSE;
	}
}
Exemplo n.º 21
0
void fe_channels_init(void)
{
	settings_add_bool("lookandfeel", "autoclose_windows", TRUE);

	signal_add("channel created", (SIGNAL_FUNC) signal_channel_created);
	signal_add("channel destroyed", (SIGNAL_FUNC) signal_channel_destroyed);
	signal_add_last("window item destroy", (SIGNAL_FUNC) signal_window_item_destroy);
	signal_add_last("window item changed", (SIGNAL_FUNC) signal_window_item_changed);
	signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);

	command_bind_first("join", NULL, (SIGNAL_FUNC) cmd_wjoin_pre);
	command_bind("join", NULL, (SIGNAL_FUNC) cmd_join);
	command_bind_last("join", NULL, (SIGNAL_FUNC) cmd_wjoin_post);
	command_bind("channel", NULL, (SIGNAL_FUNC) cmd_channel);
	command_bind("channel add", NULL, (SIGNAL_FUNC) cmd_channel_add);
	command_bind("channel remove", NULL, (SIGNAL_FUNC) cmd_channel_remove);
	command_bind("channel list", NULL, (SIGNAL_FUNC) cmd_channel_list);

	command_set_options("channel add", "auto noauto -bots -botcmd");
	command_set_options("join", "window");
}
Exemplo n.º 22
0
void botnet_init(void)
{
	botnet_config_read();
	botnet_connection_init();
	botnet_users_init();

	signal_add("botnet event", (SIGNAL_FUNC) botnet_event);
	signal_add_last("botnet event", (SIGNAL_FUNC) botnet_event_broadcast);
	signal_add("botnet event master", (SIGNAL_FUNC) botnet_event_master);
	signal_add("botnet event file", (SIGNAL_FUNC) botnet_event_file);
	command_bind("botnet", NULL, (SIGNAL_FUNC) cmd_botnet);

	autoconnect_botnets();
}
Exemplo n.º 23
0
void channel_events_init(void)
{
    settings_add_bool("misc", "join_auto_chans_on_invite", TRUE);

    signal_add_last("server event", (SIGNAL_FUNC) irc_server_event);
    signal_add_first("event 403", (SIGNAL_FUNC) event_no_such_channel); /* no such channel */
    signal_add_first("event 407", (SIGNAL_FUNC) event_duplicate_channel); /* duplicate channel */

    signal_add("event topic", (SIGNAL_FUNC) event_topic);
    signal_add_first("event join", (SIGNAL_FUNC) event_join);
    signal_add("event part", (SIGNAL_FUNC) event_part);
    signal_add("event kick", (SIGNAL_FUNC) event_kick);
    signal_add("event invite", (SIGNAL_FUNC) event_invite);
    signal_add("event 332", (SIGNAL_FUNC) event_topic_get);
    signal_add("event 333", (SIGNAL_FUNC) event_topic_info);
}
Exemplo n.º 24
0
void fe_core_commands_init(void)
{
	hide_output = FALSE;

	command_cmd = FALSE;
	memset(&time_command_now, 0, sizeof(GTimeVal));

	command_bind("help", NULL, (SIGNAL_FUNC) cmd_help);
	command_bind("echo", NULL, (SIGNAL_FUNC) cmd_echo);
	command_bind("version", NULL, (SIGNAL_FUNC) cmd_version);
	command_bind("cat", NULL, (SIGNAL_FUNC) cmd_cat);
	command_bind("beep", NULL, (SIGNAL_FUNC) cmd_beep);

	signal_add("send command", (SIGNAL_FUNC) event_command);
	signal_add_last("send command", (SIGNAL_FUNC) event_command_last);
	signal_add("default command", (SIGNAL_FUNC) event_default_command);
	signal_add("error command", (SIGNAL_FUNC) event_cmderror);
}
Exemplo n.º 25
0
void statusbar_config_init(void)
{
        read_statusbar_config();
	signal_add_last("setup reread", (SIGNAL_FUNC) read_statusbar_config);
	signal_add("theme changed", (SIGNAL_FUNC) read_statusbar_config);

        command_bind("statusbar", NULL, (SIGNAL_FUNC) cmd_statusbar);
        command_bind("statusbar enable", NULL, (SIGNAL_FUNC) cmd_statusbar_enable);
        command_bind("statusbar disable", NULL, (SIGNAL_FUNC) cmd_statusbar_disable);
        command_bind("statusbar reset", NULL, (SIGNAL_FUNC) cmd_statusbar_reset);
        command_bind("statusbar add", NULL, (SIGNAL_FUNC) cmd_statusbar_add);
        command_bind("statusbar remove", NULL, (SIGNAL_FUNC) cmd_statusbar_remove);
        command_bind("statusbar type", NULL, (SIGNAL_FUNC) cmd_statusbar_type);
        command_bind("statusbar placement", NULL, (SIGNAL_FUNC) cmd_statusbar_placement);
        command_bind("statusbar position", NULL, (SIGNAL_FUNC) cmd_statusbar_position);
        command_bind("statusbar visible", NULL, (SIGNAL_FUNC) cmd_statusbar_visible);

	command_set_options("statusbar add", "+before +after +priority +alignment");
}
Exemplo n.º 26
0
void perl_core_init(void)
{
        print_script_errors = 1;
	settings_add_str("perl", "perl_use_lib", PERL_USE_LIB);

	/*PL_perl_destruct_level = 1; - this crashes with some people.. */
	perl_signals_init();
        signal_add_last("script error", (SIGNAL_FUNC) sig_script_error);

	perl_scripts_init();

	if (irssi_init_finished)
		perl_scripts_autorun();
	else {
		signal_add("irssi init finished", (SIGNAL_FUNC) sig_autorun);
		settings_check();
	}

	module_register("perl", "core");
}
Exemplo n.º 27
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);
}
Exemplo n.º 28
0
void fe_core_commands_init(void)
{
    command_hide_output = 0;

    command_cmd = FALSE;
    memset(&time_command_now, 0, sizeof(GTimeVal));

    command_bind("echo", NULL, (SIGNAL_FUNC) cmd_echo);
    command_bind("version", NULL, (SIGNAL_FUNC) cmd_version);
    command_bind("cat", NULL, (SIGNAL_FUNC) cmd_cat);
    command_bind("beep", NULL, (SIGNAL_FUNC) cmd_beep);
    command_bind("uptime", NULL, (SIGNAL_FUNC) cmd_uptime);
    command_bind_first("nick", NULL, (SIGNAL_FUNC) cmd_nick);

    signal_add("send command", (SIGNAL_FUNC) event_command);
    signal_add_last("send command", (SIGNAL_FUNC) event_command_last);
    signal_add("default command", (SIGNAL_FUNC) event_default_command);
    signal_add("error command", (SIGNAL_FUNC) event_cmderror);
    signal_add("list subcommands", (SIGNAL_FUNC) event_list_subcommands);

    command_set_options("echo", "current +level +window");
}
Exemplo n.º 29
0
void statusbar_config_init(void)
{
        read_statusbar_config();
	signal_add_last("setup reread", (SIGNAL_FUNC) read_statusbar_config);
	signal_add("theme changed", (SIGNAL_FUNC) read_statusbar_config);

	command_bind("statusbar", NULL, (SIGNAL_FUNC) cmd_statusbar);
	command_bind("statusbar list", NULL, (SIGNAL_FUNC) cmd_statusbar_list);
	command_bind_data("statusbar add", NULL, (SIGNAL_FUNC) cmd_statusbar_add_modify, GINT_TO_POINTER(TRUE));
	command_bind_data("statusbar modify", NULL, (SIGNAL_FUNC) cmd_statusbar_add_modify, GINT_TO_POINTER(FALSE));
	command_bind("statusbar reset", NULL, (SIGNAL_FUNC) cmd_statusbar_reset);
	command_bind("statusbar info", NULL, (SIGNAL_FUNC) cmd_statusbar_info);
	command_bind_data("statusbar additem", NULL, (SIGNAL_FUNC) cmd_statusbar_additem_modifyitem, GINT_TO_POINTER(TRUE));
	command_bind_data("statusbar modifyitem", NULL, (SIGNAL_FUNC) cmd_statusbar_additem_modifyitem, GINT_TO_POINTER(FALSE));
	command_bind("statusbar removeitem", NULL, (SIGNAL_FUNC) cmd_statusbar_removeitem);

	command_set_options("statusbar additem", "+before +after +priority +alignment");
	command_set_options("statusbar modifyitem", "+before +after +priority +alignment");
	command_set_options("statusbar add",
	                    "disable nodisable +type +placement +position +visible");
	command_set_options("statusbar modify",
	                    "disable nodisable +type +placement +position +visible");
}
Exemplo n.º 30
0
void perl_core_init(void)
{
	int argc = G_N_ELEMENTS(perl_args);
	char **argv = perl_args;

	PERL_SYS_INIT3(&argc, &argv, &environ);
        print_script_errors = 1;
	settings_add_str("perl", "perl_use_lib", PERL_USE_LIB);

	/*PL_perl_destruct_level = 1; - this crashes with some people.. */
	perl_signals_init();
        signal_add_last("script error", (SIGNAL_FUNC) sig_script_error);

	perl_scripts_init();

	if (irssi_init_finished)
		perl_scripts_autorun();
	else {
		signal_add("irssi init finished", (SIGNAL_FUNC) sig_autorun);
		settings_check();
	}

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