summaryrefslogtreecommitdiff
path: root/src/plugins/buflist/buflist-bar-item.c
diff options
context:
space:
mode:
authorAndrew Potter <agpotter@gmail.com>2021-03-26 17:27:37 -0700
committerSébastien Helleu <flashcode@flashtux.org>2021-05-16 10:00:30 +0200
commit94c902adfcbc7bae5039fe383ddfc5064297d40c (patch)
tree8fca3990db5140e48001a6c6b1fd7a5b25b52032 /src/plugins/buflist/buflist-bar-item.c
parent670c5cd7456e4c9c3be0d3ef8a5cadd9df764b43 (diff)
downloadweechat-94c902adfcbc7bae5039fe383ddfc5064297d40c.zip
irc, buflist: add bar item "tls_version" with options for colors, add buflist format "${format_tls_version}" (issue #1622)
Diffstat (limited to 'src/plugins/buflist/buflist-bar-item.c')
-rw-r--r--src/plugins/buflist/buflist-bar-item.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c
index 88972cf8c..90cb7234d 100644
--- a/src/plugins/buflist/buflist-bar-item.c
+++ b/src/plugins/buflist/buflist-bar-item.c
@@ -312,7 +312,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
const char *hotlist_priority[4] = { "low", "message", "private",
"highlight" };
const char indent_empty[1] = { '\0' };
- const char *ptr_lag, *ptr_item_name;
+ const char *ptr_lag, *ptr_item_name, *ptr_tls_version;
int item_index, num_buffers, is_channel, is_private;
int i, j, length_max_number, current_buffer, number, prev_number, priority;
int rc, count, line_number, line_number_current_buffer;
@@ -596,6 +596,14 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
"format_lag", "");
}
+ /* tls version */
+ ptr_tls_version = weechat_buffer_get_string (ptr_buffer, "localvar_tls_version");
+ weechat_hashtable_set (
+ buflist_hashtable_extra_vars,
+ "format_tls_version",
+ (ptr_tls_version && ptr_tls_version[0]) ?
+ weechat_config_string (buflist_config_format_tls_version) : "");
+
/* check condition: if false, the buffer is not displayed */
condition = weechat_string_eval_expression (
weechat_config_string (buflist_config_look_display_conditions),