Esempio n. 1
0
void fe_ignore_init(void)
{
    command_bind("ignore", NULL, (SIGNAL_FUNC) cmd_ignore);
    command_bind("unignore", NULL, (SIGNAL_FUNC) cmd_unignore);

    signal_add("ignore destroyed", (SIGNAL_FUNC) sig_ignore_destroyed);
    signal_add("ignore created", (SIGNAL_FUNC) sig_ignore_created);
    signal_add("ignore changed", (SIGNAL_FUNC) sig_ignore_created);

    command_set_options("ignore", "regexp full except replies -network -ircnet -time -pattern -channels");
}
Esempio n. 2
0
void dcc_send_init(void)
{
        dcc_register_type("SEND");
	settings_add_str("dcc", "dcc_upload_path", "~");
	settings_add_bool("dcc", "dcc_send_replace_space_with_underscore", FALSE);
	signal_add("dcc destroyed", (SIGNAL_FUNC) sig_dcc_destroyed);
	command_bind("dcc send", NULL, (SIGNAL_FUNC) cmd_dcc_send);
	command_set_options("dcc send", "append flush prepend rmhead rmtail");

	dcc_queue_init();
}
Esempio n. 3
0
void fe_exec_init(void)
{
	command_bind("exec", NULL, (SIGNAL_FUNC) cmd_exec);
	command_set_options("exec", "!- interactive nosh +name out +msg +notice +in window close +level quiet");

        signal_exec_input = signal_get_uniq_id("exec input");
        signal_add("pidwait", (SIGNAL_FUNC) sig_pidwait);
        signal_add("exec input", (SIGNAL_FUNC) sig_exec_input);
        signal_add("window destroyed", (SIGNAL_FUNC) sig_window_destroyed);
	signal_add_first("send text", (SIGNAL_FUNC) event_text);
}
Esempio n. 4
0
void fe_settings_init(void)
{
    command_bind("set", NULL, (SIGNAL_FUNC) cmd_set);
    command_bind("toggle", NULL, (SIGNAL_FUNC) cmd_toggle);
    command_bind("alias", NULL, (SIGNAL_FUNC) cmd_alias);
    command_bind("unalias", NULL, (SIGNAL_FUNC) cmd_unalias);
    command_bind("reload", NULL, (SIGNAL_FUNC) cmd_reload);
    command_bind("save", NULL, (SIGNAL_FUNC) cmd_save);

    command_set_options("set", "clear");
}
Esempio n. 5
0
File: perl-fe.c Progetto: ahf/irssi
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");
	command_set_options("script reset", "autorun");

        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");
}
Esempio n. 6
0
void chat_commands_init(void)
{
	settings_add_str("misc", "quit_message", "leaving");

	command_bind("server", NULL, (SIGNAL_FUNC) cmd_server);
	command_bind("server connect", NULL, (SIGNAL_FUNC) cmd_server_connect);
	command_bind("connect", NULL, (SIGNAL_FUNC) cmd_connect);
	command_bind("disconnect", NULL, (SIGNAL_FUNC) cmd_disconnect);
	command_bind("quit", NULL, (SIGNAL_FUNC) cmd_quit);
	command_bind("msg", NULL, (SIGNAL_FUNC) cmd_msg);
	command_bind("foreach", NULL, (SIGNAL_FUNC) cmd_foreach);
	command_bind("foreach server", NULL, (SIGNAL_FUNC) cmd_foreach_server);
	command_bind("foreach channel", NULL, (SIGNAL_FUNC) cmd_foreach_channel);
	command_bind("foreach query", NULL, (SIGNAL_FUNC) cmd_foreach_query);

	signal_add("default command server", (SIGNAL_FUNC) sig_default_command_server);
	signal_add("server sendmsg", (SIGNAL_FUNC) sig_server_sendmsg);

	command_set_options("connect", "4 6 !! -network ssl +ssl_cert +ssl_pkey +ssl_pass ssl_verify +ssl_cafile +ssl_capath +host noproxy -rawlog noautosendcmd");
	command_set_options("msg", "channel nick");
}
Esempio n. 7
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");
}
Esempio n. 8
0
void fe_settings_init(void)
{
	command_bind("set", NULL, (SIGNAL_FUNC) cmd_set);
	command_bind("toggle", NULL, (SIGNAL_FUNC) cmd_toggle);
	command_bind("alias", NULL, (SIGNAL_FUNC) cmd_alias);
	command_bind("unalias", NULL, (SIGNAL_FUNC) cmd_unalias);
	command_bind("reload", NULL, (SIGNAL_FUNC) cmd_reload);
	command_bind("save", NULL, (SIGNAL_FUNC) cmd_save);
	command_set_options("set", "clear default");

        signal_add("settings errors", (SIGNAL_FUNC) sig_settings_errors);
}
Esempio n. 9
0
void window_commands_init(void)
{
	command_bind("window", NULL, (SIGNAL_FUNC) cmd_window);
	command_bind("window new", NULL, (SIGNAL_FUNC) cmd_window_new);
	command_bind("window close", NULL, (SIGNAL_FUNC) cmd_window_close);
	command_bind("window kill", NULL, (SIGNAL_FUNC) cmd_window_close);
	command_bind("window server", NULL, (SIGNAL_FUNC) cmd_window_server);
	command_bind("window refnum", NULL, (SIGNAL_FUNC) cmd_window_refnum);
	command_bind("window goto", NULL, (SIGNAL_FUNC) cmd_window_goto);
	command_bind("window previous", NULL, (SIGNAL_FUNC) cmd_window_previous);
	command_bind("window next", NULL, (SIGNAL_FUNC) cmd_window_next);
	command_bind("window last", NULL, (SIGNAL_FUNC) cmd_window_last);
	command_bind("window level", NULL, (SIGNAL_FUNC) cmd_window_level);
	command_bind("window immortal", NULL, (SIGNAL_FUNC) cmd_window_immortal);
	command_bind("window item", NULL, (SIGNAL_FUNC) cmd_window_item);
	command_bind("window item prev", NULL, (SIGNAL_FUNC) cmd_window_item_prev);
	command_bind("window item next", NULL, (SIGNAL_FUNC) cmd_window_item_next);
	command_bind("window item goto", NULL, (SIGNAL_FUNC) cmd_window_item_goto);
	command_bind("window item move", NULL, (SIGNAL_FUNC) cmd_window_item_move);
	command_bind("window number", NULL, (SIGNAL_FUNC) cmd_window_number);
	command_bind("window name", NULL, (SIGNAL_FUNC) cmd_window_name);
	command_bind("window history", NULL, (SIGNAL_FUNC) cmd_window_history);
	command_bind("window move", NULL, (SIGNAL_FUNC) cmd_window_move);
	command_bind("window move prev", NULL, (SIGNAL_FUNC) cmd_window_move_prev);
	command_bind("window move next", NULL, (SIGNAL_FUNC) cmd_window_move_next);
	command_bind("window move first", NULL, (SIGNAL_FUNC) cmd_window_move_first);
	command_bind("window move last", NULL, (SIGNAL_FUNC) cmd_window_move_last);
	command_bind("window list", NULL, (SIGNAL_FUNC) cmd_window_list);
	command_bind("window theme", NULL, (SIGNAL_FUNC) cmd_window_theme);
	command_bind("layout", NULL, (SIGNAL_FUNC) cmd_layout);
	/* SYNTAX: LAYOUT SAVE */
	command_bind("layout save", NULL, (SIGNAL_FUNC) windows_layout_save);
	/* SYNTAX: LAYOUT RESET */
	command_bind("layout reset", NULL, (SIGNAL_FUNC) windows_layout_reset);
	command_bind("foreach window", NULL, (SIGNAL_FUNC) cmd_foreach_window);

	command_set_options("window number", "sticky");
	command_set_options("window server", "sticky unsticky");
	command_set_options("window theme", "delete");
}
Esempio n. 10
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");
}
Esempio n. 11
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");
}
Esempio n. 12
0
void textbuffer_commands_init(void)
{
	settings_add_level("misc", "scrollback_levelclear_levels", "crap clientcrap");
	command_bind("clear", NULL, (SIGNAL_FUNC) cmd_clear);
	command_bind("window scroll", NULL, (SIGNAL_FUNC) cmd_window_scroll);
	command_bind("scrollback", NULL, (SIGNAL_FUNC) cmd_scrollback);
	command_bind("scrollback clear", NULL, (SIGNAL_FUNC) cmd_scrollback_clear);
	command_bind("scrollback levelclear", NULL, (SIGNAL_FUNC) cmd_scrollback_levelclear);
	command_bind("scrollback goto", NULL, (SIGNAL_FUNC) cmd_scrollback_goto);
	command_bind("scrollback home", NULL, (SIGNAL_FUNC) cmd_scrollback_home);
	command_bind("scrollback end", NULL, (SIGNAL_FUNC) cmd_scrollback_end);
	command_bind("scrollback redraw", NULL, (SIGNAL_FUNC) cmd_scrollback_redraw);
	command_bind("scrollback status", NULL, (SIGNAL_FUNC) cmd_scrollback_status);
#ifdef HAVE_CUIX
	command_bind("cuix", NULL, (SIGNAL_FUNC) cmd_cuix);
#endif

	command_set_options("clear", "all");
	command_set_options("scrollback clear", "all");
	command_set_options("scrollback levelclear", "all");

	signal_add("away mode changed", (SIGNAL_FUNC) sig_away_changed);
}
Esempio n. 13
0
void themes_init(void)
{
	settings_add_str("lookandfeel", "theme", "default");

	default_formats = g_hash_table_new((GHashFunc) g_str_hash,
					   (GCompareFunc) g_str_equal);
	internal_theme = read_internal_theme();

        init_finished = FALSE;
        init_errors = NULL;

	themes_reload();

	command_bind("format", NULL, (SIGNAL_FUNC) cmd_format);
	command_bind("save", NULL, (SIGNAL_FUNC) cmd_save);
	signal_add("complete command format", (SIGNAL_FUNC) sig_complete_format);
	signal_add("irssi init finished", (SIGNAL_FUNC) sig_print_errors);
        signal_add("setup changed", (SIGNAL_FUNC) read_settings);
	signal_add("setup reread", (SIGNAL_FUNC) themes_reload);

	command_set_options("format", "delete reset");
	command_set_options("save", "formats");
}
Esempio n. 14
0
void keyboard_init(void)
{
	keys = g_hash_table_new((GHashFunc) g_istr_hash, (GCompareFunc) g_istr_equal);
	keyinfos = NULL;

	key_bind("command", "Run any IRC command", NULL, NULL, (SIGNAL_FUNC) sig_command);

	/* read the keyboard config when all key binds are known */
	signal_add("irssi init read settings", (SIGNAL_FUNC) read_keyboard_config);
	signal_add("setup reread", (SIGNAL_FUNC) read_keyboard_config);
	signal_add("complete command bind", (SIGNAL_FUNC) sig_complete_bind);

	command_bind("bind", NULL, (SIGNAL_FUNC) cmd_bind);
	command_set_options("bind", "delete");
}
Esempio n. 15
0
void textbuffer_commands_init(void)
{
	command_bind("clear", NULL, (SIGNAL_FUNC) cmd_clear);
	command_bind("window scroll", NULL, (SIGNAL_FUNC) cmd_window_scroll);
	command_bind("scrollback", NULL, (SIGNAL_FUNC) cmd_scrollback);
	command_bind("scrollback clear", NULL, (SIGNAL_FUNC) cmd_scrollback_clear);
	command_bind("scrollback goto", NULL, (SIGNAL_FUNC) cmd_scrollback_goto);
	command_bind("scrollback home", NULL, (SIGNAL_FUNC) cmd_scrollback_home);
	command_bind("scrollback end", NULL, (SIGNAL_FUNC) cmd_scrollback_end);
	command_bind("scrollback redraw", NULL, (SIGNAL_FUNC) cmd_scrollback_redraw);
	command_bind("scrollback status", NULL, (SIGNAL_FUNC) cmd_scrollback_status);

	command_set_options("clear", "all");

	signal_add("away mode changed", (SIGNAL_FUNC) sig_away_changed);
}
Esempio n. 16
0
void fe_server_init(void)
{
	command_bind("server", NULL, (SIGNAL_FUNC) cmd_server);
	command_bind("server add", NULL, (SIGNAL_FUNC) cmd_server_add);
	command_bind("server remove", NULL, (SIGNAL_FUNC) cmd_server_remove);
	command_set_options("server add", "auto noauto -host -cmdspeed -cmdmax -port");

	signal_add("server looking", (SIGNAL_FUNC) sig_server_looking);
	signal_add("server connecting", (SIGNAL_FUNC) sig_server_connecting);
	signal_add("server connected", (SIGNAL_FUNC) sig_server_connected);
	signal_add("server connect failed", (SIGNAL_FUNC) sig_connect_failed);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
	signal_add("server quit", (SIGNAL_FUNC) sig_server_quit);

	signal_add("server lag disconnect", (SIGNAL_FUNC) sig_server_lag_disconnected);
	signal_add("server reconnect remove", (SIGNAL_FUNC) sig_server_reconnect_removed);
	signal_add("server reconnect not found", (SIGNAL_FUNC) sig_server_reconnect_not_found);
}
Esempio n. 17
0
void hilight_text_init(void)
{
    settings_add_str("lookandfeel", "hilight_color", "%Y");
    settings_add_str("lookandfeel", "hilight_act_color", "%M");
    settings_add_level("lookandfeel", "hilight_level", "PUBLIC DCCMSGS");

    read_settings();

    nickmatch = nickmatch_init(hilight_nick_cache);
    read_hilight_config();

    signal_add_first("print text", (SIGNAL_FUNC) sig_print_text);
    signal_add("setup reread", (SIGNAL_FUNC) read_hilight_config);
    signal_add("setup changed", (SIGNAL_FUNC) read_settings);

    command_bind("hilight", NULL, (SIGNAL_FUNC) cmd_hilight);
    command_bind("dehilight", NULL, (SIGNAL_FUNC) cmd_dehilight);
    command_set_options("hilight", "-color -actcolor -level -priority -network -channels nick word line mask full regexp");
}
Esempio n. 18
0
void gui_printtext_init(void)
{
	next_xpos = next_ypos = -1;
	format = g_string_new(NULL);

	settings_add_int("history", "scrollback_lines", 500);
	settings_add_int("history", "scrollback_hours", 24);
	settings_add_bool("history", "scrollback_save_formats", FALSE);

	signal_add("gui print text", (SIGNAL_FUNC) sig_gui_print_text);
	signal_add("print text finished", (SIGNAL_FUNC) sig_printtext_finished);
	signal_add("print format", (SIGNAL_FUNC) sig_print_format);
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);
	signal_add("beep", (SIGNAL_FUNC) beep);
	command_bind("clear", NULL, (SIGNAL_FUNC) cmd_clear);
	command_set_options("clear", "all");

	read_settings();
}
Esempio n. 19
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");
}
Esempio n. 20
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");
}
Esempio n. 21
0
void modes_init(void)
{
	settings_add_str("misc", "opermode", "");
	settings_add_int("misc", "max_wildcard_modes", 6);

	signal_add("event 221", (SIGNAL_FUNC) event_user_mode);
	signal_add("event 305", (SIGNAL_FUNC) event_unaway);
	signal_add("event 306", (SIGNAL_FUNC) event_away);
	signal_add("event 381", (SIGNAL_FUNC) event_oper);
	signal_add("event mode", (SIGNAL_FUNC) event_mode);
        signal_add("requested usermode change", (SIGNAL_FUNC) sig_req_usermode_change);

	command_bind_irc("op", NULL, (SIGNAL_FUNC) cmd_op);
	command_bind_irc("deop", NULL, (SIGNAL_FUNC) cmd_deop);
	command_bind_irc("voice", NULL, (SIGNAL_FUNC) cmd_voice);
	command_bind_irc("devoice", NULL, (SIGNAL_FUNC) cmd_devoice);
	command_bind_irc("mode", NULL, (SIGNAL_FUNC) cmd_mode);

	command_set_options("op", "yes");
}
Esempio n. 22
0
void fe_log_init(void)
{
	autoremove_tag = g_timeout_add(60000, (GSourceFunc) sig_autoremove, NULL);
	skip_next_printtext = FALSE;

	settings_add_bool("log", "awaylog_colors", TRUE);
        settings_add_bool("log", "autolog", FALSE);
	settings_add_bool("log", "autolog_colors", FALSE);
	settings_add_bool("log", "autolog_only_saved_channels", FALSE);
        settings_add_str("log", "autolog_path", "~/irclogs/$tag/$0.log");
	settings_add_level("log", "autolog_level", "all -crap -clientcrap -ctcps");
        settings_add_str("log", "log_theme", "");
	settings_add_str("log", "autolog_ignore_targets", "");

	autolog_level = 0;
	log_theme_name = NULL;
	read_settings();

	command_bind("log", NULL, (SIGNAL_FUNC) cmd_log);
	command_bind("log open", NULL, (SIGNAL_FUNC) cmd_log_open);
	command_bind("log close", NULL, (SIGNAL_FUNC) cmd_log_close);
	command_bind("log start", NULL, (SIGNAL_FUNC) cmd_log_start);
	command_bind("log stop", NULL, (SIGNAL_FUNC) cmd_log_stop);
	command_bind("window log", NULL, (SIGNAL_FUNC) cmd_window_log);
	command_bind("window logfile", NULL, (SIGNAL_FUNC) cmd_window_logfile);
	signal_add_first("print text", (SIGNAL_FUNC) sig_printtext);
	signal_add("window item remove", (SIGNAL_FUNC) sig_window_item_remove);
	signal_add("window refnum changed", (SIGNAL_FUNC) sig_window_refnum_changed);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
	signal_add("log locked", (SIGNAL_FUNC) sig_log_locked);
	signal_add("log create failed", (SIGNAL_FUNC) sig_log_create_failed);
	signal_add("log new", (SIGNAL_FUNC) sig_log_new);
	signal_add("log config read", (SIGNAL_FUNC) sig_log_config_read);
	signal_add("log config save", (SIGNAL_FUNC) sig_log_config_save);
	signal_add("awaylog show", (SIGNAL_FUNC) sig_awaylog_show);
	signal_add("theme destroyed", (SIGNAL_FUNC) sig_theme_destroyed);
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);

	command_set_options("log open", "noopen autoopen -targets window colors");
}
Esempio n. 23
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");
}
Esempio n. 24
0
void completion_init(void)
{
	complist = NULL;
	last_line = NULL; last_line_pos = -1;

	chat_completion_init();

	command_bind("completion", NULL, (SIGNAL_FUNC) cmd_completion);

	signal_add_first("complete word", (SIGNAL_FUNC) sig_complete_word);
	signal_add_first("complete erase", (SIGNAL_FUNC) sig_complete_erase);
	signal_add("complete command set", (SIGNAL_FUNC) sig_complete_set);
	signal_add("complete command toggle", (SIGNAL_FUNC) sig_complete_toggle);
	signal_add("complete command load", (SIGNAL_FUNC) sig_complete_filename);
	signal_add("complete command cat", (SIGNAL_FUNC) sig_complete_filename);
	signal_add("complete command save", (SIGNAL_FUNC) sig_complete_filename);
	signal_add("complete command reload", (SIGNAL_FUNC) sig_complete_filename);
	signal_add("complete command rawlog open", (SIGNAL_FUNC) sig_complete_filename);
	signal_add("complete command rawlog save", (SIGNAL_FUNC) sig_complete_filename);
	signal_add("complete command help", (SIGNAL_FUNC) sig_complete_command);

	command_set_options("completion", "auto delete");
}
Esempio n. 25
0
void fe_server_init(void)
{
	command_bind("server", NULL, (SIGNAL_FUNC) cmd_server);
	command_bind("server connect", NULL, (SIGNAL_FUNC) cmd_server_connect);
	command_bind("server add", NULL, (SIGNAL_FUNC) cmd_server_add);
	command_bind("server remove", NULL, (SIGNAL_FUNC) cmd_server_remove);
	command_bind_first("server", NULL, (SIGNAL_FUNC) server_command);
	command_bind_first("disconnect", NULL, (SIGNAL_FUNC) server_command);
	command_set_options("server add", "4 6 ssl +ssl_cert +ssl_pkey ssl_verify +ssl_cafile +ssl_capath auto noauto proxy noproxy -host -port");

	signal_add("server looking", (SIGNAL_FUNC) sig_server_looking);
	signal_add("server connecting", (SIGNAL_FUNC) sig_server_connecting);
	signal_add("server connected", (SIGNAL_FUNC) sig_server_connected);
	signal_add("server connect failed", (SIGNAL_FUNC) sig_connect_failed);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
	signal_add("server quit", (SIGNAL_FUNC) sig_server_quit);

	signal_add("server lag disconnect", (SIGNAL_FUNC) sig_server_lag_disconnected);
	signal_add("server reconnect remove", (SIGNAL_FUNC) sig_server_reconnect_removed);
	signal_add("server reconnect not found", (SIGNAL_FUNC) sig_server_reconnect_not_found);

	signal_add("chat protocol unknown", (SIGNAL_FUNC) sig_chat_protocol_unknown);
}
Esempio n. 26
0
void keyboard_init(void)
{
	keys = g_hash_table_new((GHashFunc) g_str_hash,
				(GCompareFunc) g_str_equal);
	default_keys = g_hash_table_new((GHashFunc) g_str_hash,
					(GCompareFunc) g_str_equal);
	keyinfos = NULL;
	key_states = g_tree_new((GCompareFunc) strcmp);
        key_config_frozen = 0;
	memset(used_keys, 0, sizeof(used_keys));

	key_bind("command", "Run any IRC command", NULL, NULL, (SIGNAL_FUNC) sig_command);
	key_bind("key", "Specify name for key binding", NULL, NULL, (SIGNAL_FUNC) sig_key);
	key_bind("multi", "Run multiple commands", NULL, NULL, (SIGNAL_FUNC) sig_multi);

	/* read the keyboard config when all key binds are known */
	signal_add("irssi init read settings", (SIGNAL_FUNC) read_keyboard_config);
	signal_add("setup reread", (SIGNAL_FUNC) read_keyboard_config);
	signal_add("complete command bind", (SIGNAL_FUNC) sig_complete_bind);

	command_bind("bind", NULL, (SIGNAL_FUNC) cmd_bind);
	command_set_options("bind", "delete");
}
Esempio n. 27
0
void dcc_chat_init(void)
{
        dcc_register_type("CHAT");
	settings_add_bool("dcc", "dcc_mirc_ctcp", FALSE);
	settings_add_str("dcc", "dcc_autochat_masks", "");

	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 chat", NULL, (SIGNAL_FUNC) cmd_dcc_chat);
	command_set_options("dcc chat", "passive");
	command_bind("mircdcc", NULL, (SIGNAL_FUNC) cmd_mircdcc);
	command_bind("dcc close", NULL, (SIGNAL_FUNC) cmd_dcc_close);
	command_bind("whois", NULL, (SIGNAL_FUNC) cmd_whois);
	signal_add("dcc destroyed", (SIGNAL_FUNC) sig_dcc_destroyed);
	signal_add("ctcp msg dcc chat", (SIGNAL_FUNC) ctcp_msg_dcc_chat);
	signal_add_first("dcc chat message", (SIGNAL_FUNC) dcc_chat_msg);
	signal_add("dcc ctcp dcc", (SIGNAL_FUNC) dcc_ctcp_redirect);
	signal_add("dcc reply dcc", (SIGNAL_FUNC) dcc_ctcp_reply_redirect);
	signal_add("ctcp reply dcc reject", (SIGNAL_FUNC) ctcp_reply_dcc_reject);
	signal_add("event nick", (SIGNAL_FUNC) event_nick);
}
Esempio n. 28
0
void lastlog_init(void)
{
	command_bind("lastlog", NULL, (SIGNAL_FUNC) cmd_lastlog);

	command_set_options("lastlog", "!- # force clear -file -window new away word regexp case count date @a @after @before");
}
Esempio n. 29
0
void irc_commands_init(void)
{
	tmpstr = g_string_new(NULL);

	settings_add_str("misc", "part_message", "");
	settings_add_time("misc", "knockout_time", "5min");
	settings_add_str("misc", "wall_format", "[Wall/$0] $1-");
	settings_add_bool("misc", "kick_first_on_kickban", FALSE);
	settings_add_bool("misc", "auto_whowas", TRUE);

	knockout_tag = g_timeout_add(KNOCKOUT_TIMECHECK, (GSourceFunc) knockout_timeout, NULL);

	command_bind_irc("notice", NULL, (SIGNAL_FUNC) cmd_notice);
	command_bind_irc("ctcp", NULL, (SIGNAL_FUNC) cmd_ctcp);
	command_bind_irc("nctcp", NULL, (SIGNAL_FUNC) cmd_nctcp);
	command_bind_irc("part", NULL, (SIGNAL_FUNC) cmd_part);
	command_bind_irc("kick", NULL, (SIGNAL_FUNC) cmd_kick);
	command_bind_irc("topic", NULL, (SIGNAL_FUNC) cmd_topic);
	command_bind_irc("invite", NULL, (SIGNAL_FUNC) cmd_invite);
	command_bind_irc("list", NULL, (SIGNAL_FUNC) cmd_list);
	command_bind_irc("who", NULL, (SIGNAL_FUNC) cmd_who);
	command_bind_irc("names", NULL, (SIGNAL_FUNC) cmd_names);
	command_bind_irc("nick", NULL, (SIGNAL_FUNC) cmd_nick);
	/* SYNTAX: NOTE <command> [&<password>] [+|-<flags>] [<arguments>] */
	command_bind_irc("note", NULL, (SIGNAL_FUNC) command_self);
	command_bind_irc("whois", NULL, (SIGNAL_FUNC) cmd_whois);
	command_bind_irc("whowas", NULL, (SIGNAL_FUNC) cmd_whowas);
	command_bind_irc("ping", NULL, (SIGNAL_FUNC) cmd_ping);
	/* SYNTAX: KILL <nick> <reason> */
	command_bind_irc("kill", NULL, (SIGNAL_FUNC) command_2self);
	command_bind_irc("away", NULL, (SIGNAL_FUNC) cmd_away);
	/* SYNTAX: ISON <nicks> */
	command_bind_irc("ison", NULL, (SIGNAL_FUNC) command_1self);
	command_bind_irc("accept", NULL, (SIGNAL_FUNC) cmd_accept);
	/* SYNTAX: ADMIN [<server>|<nickname>] */
	command_bind_irc("admin", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: INFO [<server>] */
	command_bind_irc("info", NULL, (SIGNAL_FUNC) command_self);
    /* SYNTAX: KNOCK <channel> */
    command_bind_irc("knock", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: LINKS [[<server>] <mask>] */
	command_bind_irc("links", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: LUSERS [<server mask> [<remote server>]] */
	command_bind_irc("lusers", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: MAP */
	command_bind_irc("map", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: MOTD [<server>|<nick>] */
	command_bind_irc("motd", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: REHASH [<option>] */
	command_bind_irc("rehash", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: STATS <type> [<server>] */
	command_bind_irc("stats", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: TIME [<server>|<nick>] */
	command_bind_irc("time", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: TRACE [<server>|<nick>] */
	command_bind_irc("trace", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: VERSION [<server>|<nick>] */
	command_bind_irc("version", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: SERVLIST [<server mask>] */
	command_bind_irc("servlist", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: SILENCE [[+|-]<nick!user@host>]
	           SILENCE [<nick>] */
	command_bind_irc("silence", NULL, (SIGNAL_FUNC) command_self);
	command_bind_irc("unsilence", NULL, (SIGNAL_FUNC) cmd_unsilence);
	command_bind_irc("sconnect", NULL, (SIGNAL_FUNC) cmd_sconnect);
	/* SYNTAX: SQUERY <service> [<commands>] */
	command_bind_irc("squery", NULL, (SIGNAL_FUNC) command_2self);
	/* SYNTAX: DIE */
	command_bind_irc("die", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: HASH */
	command_bind_irc("hash", NULL, (SIGNAL_FUNC) command_self);
	command_bind_irc("oper", NULL, (SIGNAL_FUNC) cmd_oper);
	/* SYNTAX: RESTART */
	command_bind_irc("restart", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: RPING <server> */
	command_bind_irc("rping", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: SQUIT <server>|<mask> <reason> */
	command_bind_irc("squit", NULL, (SIGNAL_FUNC) command_2self);
	/* SYNTAX: UPING <server> */
	command_bind_irc("uping", NULL, (SIGNAL_FUNC) command_self);
	/* SYNTAX: USERHOST <nicks> */
	command_bind_irc("userhost", NULL, (SIGNAL_FUNC) command_self);
	command_bind_irc("quote", NULL, (SIGNAL_FUNC) cmd_quote);
	command_bind_irc("rawquote", NULL, (SIGNAL_FUNC) cmd_rawquote);
	command_bind_irc("wall", NULL, (SIGNAL_FUNC) cmd_wall);
	command_bind_irc("wallchops", NULL, (SIGNAL_FUNC) cmd_wallchops);
	command_bind_irc("wait", NULL, (SIGNAL_FUNC) cmd_wait);
	/* SYNTAX: WALLOPS <message> */
	command_bind_irc("wallops", NULL, (SIGNAL_FUNC) command_1self);
	command_bind_irc("kickban", NULL, (SIGNAL_FUNC) cmd_kickban);
	command_bind_irc("knockout", NULL, (SIGNAL_FUNC) cmd_knockout);
	command_bind_irc("server purge", NULL, (SIGNAL_FUNC) cmd_server_purge);

	signal_add("channel destroyed", (SIGNAL_FUNC) sig_channel_destroyed);
	signal_add("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
	signal_add("whois try whowas", (SIGNAL_FUNC) sig_whois_try_whowas);
	signal_add("whois event", (SIGNAL_FUNC) event_whois);
	signal_add("whois end", (SIGNAL_FUNC) event_end_of_whois);
	signal_add("whowas event", (SIGNAL_FUNC) event_whowas);

	command_set_options("connect", "+ircnet");
	command_set_options("topic", "delete");
	command_set_options("list", "yes");
	command_set_options("away", "one all");
	command_set_options("whois", "yes");
}