diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-04 14:08:34 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-04 14:08:34 +0000 |
commit | 575a5a3b8b69fba6a92666509a89a3e684668793 (patch) | |
tree | d9a111ba9d1b2d69d4a28a3d9e653eb2a9fa9aa3 /src/fe-common/core | |
parent | aeae7935ecdb802a7d6de1248cc826bec056b3ec (diff) | |
download | irssi-575a5a3b8b69fba6a92666509a89a3e684668793.zip |
Don't match nicks in -nick hilights.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2191 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/hilight-text.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index b280c1f5..ffb90a88 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -282,6 +282,7 @@ static void sig_print_text(TEXT_DEST_REC *dest, const char *text, HILIGHT_REC *hilight; char *color, *newstr; int old_level, hilight_start, hilight_end, hilight_len; + int nick_match; if (dest->level & MSGLEVEL_NOHILIGHT) return; @@ -294,11 +295,15 @@ static void sig_print_text(TEXT_DEST_REC *dest, const char *text, if (hilight == NULL) return; - /* update the level / hilight info */ - old_level = dest->level; - hilight_update_text_dest(dest, hilight); + nick_match = hilight->nick && (dest->level & (MSGLEVEL_PUBLIC|MSGLEVEL_ACTIONS)) == MSGLEVEL_PUBLIC; - if (hilight->nick && (dest->level & (MSGLEVEL_PUBLIC|MSGLEVEL_ACTIONS)) == MSGLEVEL_PUBLIC) + if (!nick_match || (dest->level & MSGLEVEL_HILIGHT)) { + /* update the level / hilight info */ + old_level = dest->level; + hilight_update_text_dest(dest, hilight); + } + + if (nick_match) return; /* fe-messages.c should have taken care of this */ if (old_level & MSGLEVEL_HILIGHT) { |