summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-09-21 11:52:58 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-09-21 11:52:58 +0200
commit1a20ef41c08c60ee1a5ba11eff3b8e86e528d5b6 (patch)
tree472bcde714d19636c8f51011d300deef61cc3135 /src
parent03c0067272caae88758fd7847689177c0e18b48d (diff)
downloadweechat-1a20ef41c08c60ee1a5ba11eff3b8e86e528d5b6.zip
core: fix highlight of IRC action messages when option irc.look.nick_mode is set to "action" or "both" (closes #206)
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui-line.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c
index cc27c64a9..21cf56de6 100644
--- a/src/gui/gui-line.c
+++ b/src/gui/gui-line.c
@@ -782,7 +782,16 @@ gui_line_has_highlight (struct t_gui_line *line)
{
length = strlen (ptr_nick);
if (strncmp (ptr_msg_no_color, ptr_nick, length) == 0)
+ {
+ /* skip nick at beginning (for example: "FlashCode") */
ptr_msg_no_color += length;
+ }
+ else if (ptr_msg_no_color[0]
+ && (strncmp (ptr_msg_no_color + 1, ptr_nick, length) == 0))
+ {
+ /* skip prefix and nick at beginning (for example: "@FlashCode") */
+ ptr_msg_no_color += length + 1;
+ }
}
/*