1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 07:46:38 +02:00

Disable highlight for IRC messages from local nick

This commit is contained in:
Sebastien Helleu
2008-11-10 22:41:32 +01:00
parent cecc1f9ea7
commit f74fd05da7
3 changed files with 12 additions and 3 deletions
+9 -2
View File
@@ -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)
+2
View File
@@ -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,