From 149aa22dc868e4be766b3716deedfc8260d059cd Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Sun, 4 Oct 2015 17:18:37 +0200 Subject: [PATCH 1/3] Make /hilight list be specific with regards to -nick/-word/-line --- src/fe-common/core/hilight-text.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 87c5d467..b80cc635 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -484,10 +484,12 @@ static void hilight_print(int index, HILIGHT_REC *rec) GString *options; options = g_string_new(NULL); - if (!rec->nick || !rec->word) { - if (rec->nick) g_string_append(options, "-nick "); - if (rec->word) g_string_append(options, "-word "); - } + if (rec->nick) + g_string_append(options, "-nick "); + else if (rec->word) + g_string_append(options, "-word "); + else + g_string_append(options, "-line "); if (rec->nickmask) g_string_append(options, "-mask "); if (rec->fullword) g_string_append(options, "-full "); From 999c9ebe3c7d254832fc47f4a5c3eba8cca6dc98 Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Sun, 4 Oct 2015 17:22:26 +0200 Subject: [PATCH 2/3] Make /hilight list be specific with regards to -nick/-word/-line, v2 --- src/fe-common/core/hilight-text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index b80cc635..8031fda9 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -488,7 +488,7 @@ static void hilight_print(int index, HILIGHT_REC *rec) g_string_append(options, "-nick "); else if (rec->word) g_string_append(options, "-word "); - else + else if (rec->line) g_string_append(options, "-line "); if (rec->nickmask) g_string_append(options, "-mask "); From 3c9c11af7a6b1a38d77d86fe71dd5b0a13598d9e Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Sun, 4 Oct 2015 17:29:47 +0200 Subject: [PATCH 3/3] Make /hilight list be specific with regards to -nick/-word/-line, v3 --- src/fe-common/core/hilight-text.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 8031fda9..70ec48ab 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -484,10 +484,10 @@ static void hilight_print(int index, HILIGHT_REC *rec) GString *options; options = g_string_new(NULL); - if (rec->nick) - g_string_append(options, "-nick "); - else if (rec->word) - g_string_append(options, "-word "); + if (rec->nick || rec->word) { + if (rec->nick) g_string_append(options, "-nick "); + if (rec->word) g_string_append(options, "-word "); + } else if (rec->line) g_string_append(options, "-line ");