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"); }
void perl_core_init(void) { perl_scripts = NULL; command_bind("run", NULL, (SIGNAL_FUNC) cmd_run); command_bind_first("unload", NULL, (SIGNAL_FUNC) cmd_unload); command_bind("perl", NULL, (SIGNAL_FUNC) cmd_perl); command_bind("perlflush", NULL, (SIGNAL_FUNC) cmd_perlflush); PL_perl_destruct_level = 1; perl_signals_init(); irssi_perl_start(); irssi_perl_autorun(); }
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); }
void servers_reconnect_init(void) { settings_add_int("server", "server_reconnect_time", 300); reconnects = NULL; last_reconnect_tag = 0; reconnect_timeout_tag = g_timeout_add(1000, (GSourceFunc) server_reconnect_timeout, NULL); read_settings(); signal_add("server connect failed", (SIGNAL_FUNC) sig_reconnect); signal_add("server disconnected", (SIGNAL_FUNC) sig_reconnect); signal_add("event connected", (SIGNAL_FUNC) sig_connected); signal_add("setup changed", (SIGNAL_FUNC) read_settings); command_bind("rmreconns", NULL, (SIGNAL_FUNC) cmd_rmreconns); command_bind("reconnect", NULL, (SIGNAL_FUNC) cmd_reconnect); command_bind_first("disconnect", NULL, (SIGNAL_FUNC) cmd_disconnect); }
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"); }
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"); }
/* * 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); }