diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index 2eea85ad7..cc71c7ebb 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -626,14 +626,21 @@ int gui_chat_line_has_highlight (struct t_gui_buffer *buffer, struct t_gui_line *line) { - int rc; + int rc, i; char *msg_no_color; /* highlights are disabled on this buffer? (special value "-" means that buffer does not want any highlight) */ if (buffer->highlight_words && (strcmp (buffer->highlight_words, "-") == 0)) return 0; - + + /* check if highlight is disabled for line */ + for (i = 0; i < line->tags_count; i++) + { + if (strcmp (line->tags_array[i], GUI_CHAT_TAG_NO_HIGHLIGHT) == 0) + return 0; + } + /* check that line matches highlight tags, if any (if no tag is specified, then any tag is allowed) */ if (buffer->highlight_tags_count > 0) diff --git a/src/gui/gui-chat.h b/src/gui/gui-chat.h index f14e2c2a8..892ecb875 100644 --- a/src/gui/gui-chat.h +++ b/src/gui/gui-chat.h @@ -31,6 +31,8 @@ struct t_gui_line; #define gui_chat_printf(buffer, argz...) \ gui_chat_printf_date_tags(buffer, 0, NULL, ##argz) +#define GUI_CHAT_TAG_NO_HIGHLIGHT "no_highlight" + enum t_gui_prefix { GUI_CHAT_PREFIX_ERROR = 0, diff --git a/src/plugins/irc/irc-input.c b/src/plugins/irc/irc-input.c index 0d77558c1..daab383f7 100644 --- a/src/plugins/irc/irc-input.c +++ b/src/plugins/irc/irc-input.c @@ -56,7 +56,7 @@ irc_input_user_message_display (struct t_gui_buffer *buffer, const char *text) ptr_nick = NULL; weechat_printf_tags (buffer, - irc_protocol_tags ("privmsg", NULL), + irc_protocol_tags ("privmsg", "no_highlight"), "%s%s", irc_nick_as_prefix ((ptr_nick) ? ptr_nick : NULL, (ptr_nick) ? NULL : ptr_server->nick,