void window_activity_init(void) { settings_add_str("lookandfeel", "activity_hide_targets", ""); settings_add_level("lookandfeel", "activity_hide_level", ""); settings_add_level("lookandfeel", "activity_msg_level", "PUBLIC"); settings_add_level("lookandfeel", "activity_hilight_level", "MSGS DCCMSGS"); read_settings(); signal_add("print text", (SIGNAL_FUNC) sig_hilight_text); signal_add("window changed", (SIGNAL_FUNC) sig_dehilight_window); signal_add("window dehilight", (SIGNAL_FUNC) sig_dehilight_window); signal_add("setup changed", (SIGNAL_FUNC) read_settings); }
void fe_queries_init(void) { settings_add_level("lookandfeel", "autocreate_query_level", "MSGS DCCMSGS"); settings_add_bool("lookandfeel", "autocreate_own_query", TRUE); settings_add_time("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("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"); }
void windows_init(void) { active_win = NULL; daycheck = 0; daytag = -1; settings_add_bool("lookandfeel", "window_auto_change", FALSE); settings_add_bool("lookandfeel", "windows_auto_renumber", TRUE); settings_add_bool("lookandfeel", "window_check_level_first", FALSE); settings_add_level("lookandfeel", "window_default_level", "NONE"); read_settings(); signal_add("server looking", (SIGNAL_FUNC) sig_server_connected); signal_add("server connected", (SIGNAL_FUNC) sig_server_connected); signal_add("server disconnected", (SIGNAL_FUNC) sig_server_disconnected); signal_add("server connect failed", (SIGNAL_FUNC) sig_server_disconnected); signal_add("setup changed", (SIGNAL_FUNC) read_settings); }
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"); }
void gui_windows_init(void) { settings_add_bool("lookandfeel", "autostick_split_windows", FALSE); settings_add_bool("lookandfeel", "autounstick_windows", TRUE); settings_add_int("lookandfeel", "indent", 10); settings_add_bool("lookandfeel", "indent_always", FALSE); settings_add_bool("lookandfeel", "break_wide", FALSE); settings_add_bool("lookandfeel", "scroll", TRUE); settings_add_level("lookandfeel", "window_default_hidelevel", "HIDDEN"); window_create_override = MAIN_WINDOW_TYPE_NONE; read_settings(); signal_add("gui window create override", (SIGNAL_FUNC) sig_window_create_override); signal_add("window created", (SIGNAL_FUNC) gui_window_created); signal_add("window destroyed", (SIGNAL_FUNC) gui_window_destroyed); signal_add_first("window changed", (SIGNAL_FUNC) signal_window_changed); signal_add("setup changed", (SIGNAL_FUNC) read_settings); }
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"); }
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); }
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"); }
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"); }