diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 692dacfe6..b5f819385 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -282,6 +282,7 @@ struct t_config_option *config_color_status_filter = NULL; struct t_config_option *config_color_status_more = NULL; struct t_config_option *config_color_status_mouse = NULL; struct t_config_option *config_color_status_name = NULL; +struct t_config_option *config_color_status_name_insecure = NULL; struct t_config_option *config_color_status_name_tls = NULL; struct t_config_option *config_color_status_nicklist_count = NULL; struct t_config_option *config_color_status_number = NULL; @@ -4547,12 +4548,21 @@ config_weechat_init_options () NULL, NULL, NULL, &config_change_color, NULL, NULL, NULL, NULL, NULL); + config_color_status_name_insecure = config_file_new_option ( + weechat_config_file, weechat_config_section_color, + "status_name_insecure", "color", + N_("text color for current buffer name in status bar, if data are " + "exchanged and not secured with a protocol like TLS"), + NULL, -1, 0, "lightmagenta", NULL, 0, + NULL, NULL, NULL, + &config_change_color, NULL, NULL, + NULL, NULL, NULL); config_color_status_name_tls = config_file_new_option ( weechat_config_file, weechat_config_section_color, "status_name_tls", "color", N_("text color for current buffer name in status bar, if data are " - "secured with a protocol like TLS"), - NULL, -1, 0, "lightgreen", NULL, 0, + "exchanged and secured with a protocol like TLS"), + NULL, -1, 0, "white", NULL, 0, NULL, NULL, NULL, &config_change_color, NULL, NULL, NULL, NULL, NULL); diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index 6019c1b1b..607f49ac5 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -137,7 +137,7 @@ irc_bar_item_buffer_name_content (struct t_gui_buffer *buffer, int short_name) snprintf (buf_name, sizeof (buf_name), "%s%s[%s%s%s]", _("server"), IRC_COLOR_BAR_DELIM, - (server && server->tls_connected) ? IRC_COLOR_STATUS_NAME_TLS : IRC_COLOR_STATUS_NAME, + (server && server->tls_connected) ? IRC_COLOR_STATUS_NAME_TLS : IRC_COLOR_STATUS_NAME_INSECURE, server->name, IRC_COLOR_BAR_DELIM); } @@ -151,11 +151,11 @@ irc_bar_item_buffer_name_content (struct t_gui_buffer *buffer, int short_name) "%s%s%s%s%s%s%s%s%s%s", (part_from_channel) ? IRC_COLOR_BAR_DELIM : "", (part_from_channel) ? "(" : "", - (server && server->tls_connected) ? IRC_COLOR_STATUS_NAME_TLS : IRC_COLOR_STATUS_NAME, + (server && server->tls_connected) ? IRC_COLOR_STATUS_NAME_TLS : IRC_COLOR_STATUS_NAME_INSECURE, (server && display_server) ? server->name : "", (server && display_server) ? IRC_COLOR_BAR_DELIM : "", (server && display_server) ? "/" : "", - (server && server->tls_connected) ? IRC_COLOR_STATUS_NAME_TLS : IRC_COLOR_STATUS_NAME, + (server && server->tls_connected) ? IRC_COLOR_STATUS_NAME_TLS : IRC_COLOR_STATUS_NAME_INSECURE, (short_name) ? weechat_buffer_get_string (buffer, "short_name") : channel->name, (part_from_channel) ? IRC_COLOR_BAR_DELIM : "", (part_from_channel) ? ")" : ""); @@ -190,7 +190,7 @@ irc_bar_item_buffer_name_content (struct t_gui_buffer *buffer, int short_name) snprintf (buf, sizeof (buf), "%s%s", - (server && server->tls_connected) ? IRC_COLOR_STATUS_NAME_TLS : IRC_COLOR_STATUS_NAME, + (server && server->tls_connected) ? IRC_COLOR_STATUS_NAME_TLS : IRC_COLOR_STATUS_NAME_INSECURE, buf_name); return strdup (buf); diff --git a/src/plugins/irc/irc-color.h b/src/plugins/irc/irc-color.h index 02a2690e0..6e576c050 100644 --- a/src/plugins/irc/irc-color.h +++ b/src/plugins/irc/irc-color.h @@ -82,6 +82,7 @@ #define IRC_COLOR_NOTICE weechat_color(weechat_config_string(irc_config_color_notice)) #define IRC_COLOR_STATUS_NUMBER weechat_color("status_number") #define IRC_COLOR_STATUS_NAME weechat_color("status_name") +#define IRC_COLOR_STATUS_NAME_INSECURE weechat_color("status_name_insecure") #define IRC_COLOR_STATUS_NAME_TLS weechat_color("status_name_tls") #define IRC_COLOR_MESSAGE_JOIN weechat_color(weechat_config_string(irc_config_color_message_join)) #define IRC_COLOR_MESSAGE_ACCOUNT weechat_color(weechat_config_string(irc_config_color_message_account))