From e491dfe80c39415f08b9f1a1f4c3e677569a2dab Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Sun, 4 Oct 2015 18:27:45 +0200 Subject: [PATCH 1/2] Make /hilight list be specific with regards to -nick/-word/-line --- src/fe-common/core/hilight-text.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 87c5d467..b12705f7 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 || rec->word) { if (rec->nick) g_string_append(options, "-nick "); 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 4874dd61afaf65c5892568dbf4841c584c9cb309 Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Tue, 6 Oct 2015 14:00:14 +0200 Subject: [PATCH 2/2] Make /hilight list be specific with regards to -nick/-word/-line, v2 --- src/fe-common/core/hilight-text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index b12705f7..8e261cca 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -485,8 +485,8 @@ static void hilight_print(int index, HILIGHT_REC *rec) 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 && !rec->word) g_string_append(options, "-nick "); + if (rec->word && !rec->nick) g_string_append(options, "-word "); } else g_string_append(options, "-line ");