From b5e80f35078e78671c918f110f07be531c86b0e7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 16 Oct 2002 19:35:09 +0000 Subject: [PATCH] When ignoring without any options, don't print the [] git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2964 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-ignore.c | 3 ++- src/fe-common/core/module-formats.c | 3 ++- src/fe-common/core/module-formats.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index 3c757b49..4621ab26 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -74,7 +74,8 @@ static void ignore_print(int index, IGNORE_REC *rec) levels != NULL ? levels : "", options->str); } else { printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, - TXT_IGNORED, key != NULL ? key : "", + options->len > 0 ? TXT_IGNORED_OPTIONS : TXT_IGNORED, + key != NULL ? key : "", levels != NULL ? levels : "", options->str); } g_string_free(options, TRUE); diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c index a7fb20d0..2d4f02e1 100644 --- a/src/fe-common/core/module-formats.c +++ b/src/fe-common/core/module-formats.c @@ -233,7 +233,8 @@ FORMAT_REC fecommon_core_formats[] = { /* ---- */ { NULL, "Ignores", 0 }, - { "ignored", "Ignoring {hilight $1} from {nick $0} [$2]", 3, { 0, 0, 0 } }, + { "ignored", "Ignoring {hilight $1} from {nick $0}", 2, { 0, 0 } }, + { "ignored_options", "Ignoring {hilight $1} from {nick $0} {comment $2}", 3, { 0, 0, 0 } }, { "unignored", "Unignored {nick $0}", 1, { 0 } }, { "ignore_not_found", "{nick $0} is not being ignored", 1, { 0 } }, { "ignore_no_ignores", "There are no ignores", 0 }, diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h index 016f4d29..7cd46bab 100644 --- a/src/fe-common/core/module-formats.h +++ b/src/fe-common/core/module-formats.h @@ -201,6 +201,7 @@ enum { TXT_FILL_12, TXT_IGNORED, + TXT_IGNORED_OPTIONS, TXT_UNIGNORED, TXT_IGNORE_NOT_FOUND, TXT_IGNORE_NO_IGNORES,