diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/trigger/trigger-callback.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/trigger/trigger-callback.c b/src/plugins/trigger/trigger-callback.c index c69a50c69..ca7d95d26 100644 --- a/src/plugins/trigger/trigger-callback.c +++ b/src/plugins/trigger/trigger-callback.c @@ -789,7 +789,7 @@ trigger_callback_line_cb (const void *pointer, void *data, struct t_weelist_item *ptr_item; long unsigned int value; const char *ptr_key, *ptr_value; - char **tags, *str_tags; + char **tags, *str_tags, *string_no_color; int rc, num_tags, length; TRIGGER_CALLBACK_CB_INIT(NULL); @@ -831,6 +831,20 @@ trigger_callback_line_cb (const void *pointer, void *data, free (str_tags); } + /* build prefix without colors */ + ptr_value = weechat_hashtable_get (line, "prefix"); + string_no_color = weechat_string_remove_color (ptr_value, NULL); + weechat_hashtable_set (extra_vars, "tg_prefix_nocolor", string_no_color); + if (string_no_color) + free (string_no_color); + + /* build message without colors */ + ptr_value = weechat_hashtable_get (line, "message"); + string_no_color = weechat_string_remove_color (ptr_value, NULL); + weechat_hashtable_set (extra_vars, "tg_message_nocolor", string_no_color); + if (string_no_color) + free (string_no_color); + if (!trigger_callback_set_tags (buffer, (const char **)tags, num_tags, extra_vars)) { |