diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/fe-ignore.c | 22 | ||||
-rw-r--r-- | src/fe-common/core/module-formats.c | 2 |
2 files changed, 11 insertions, 13 deletions
diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index a94ae0fa..44a378a7 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -68,10 +68,15 @@ static void ignore_print(int index, IGNORE_REC *rec) if (options->len > 1) g_string_truncate(options, options->len-1); - printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, - TXT_IGNORE_LINE, index, - key != NULL ? key : "", - levels != NULL ? levels : "", options->str); + if (index >= 0) { + printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, + TXT_IGNORE_LINE, index, key != NULL ? key : "", + levels != NULL ? levels : "", options->str); + } else { + printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, + TXT_IGNORED, key != NULL ? key : "", + levels != NULL ? levels : "", options->str); + } g_string_free(options, TRUE); g_free(key); g_free(levels); @@ -221,14 +226,7 @@ static void cmd_unignore(const char *data) static void sig_ignore_created(IGNORE_REC *rec) { - char *key, *levels; - - key = ignore_get_key(rec); - levels = bits2level(rec->level); - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - TXT_IGNORED, key, levels); - g_free(key); - g_free(levels); + ignore_print(-1, rec); } static void sig_ignore_destroyed(IGNORE_REC *rec) diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c index 3d577546..f0cf789d 100644 --- a/src/fe-common/core/module-formats.c +++ b/src/fe-common/core/module-formats.c @@ -233,7 +233,7 @@ FORMAT_REC fecommon_core_formats[] = { /* ---- */ { NULL, "Ignores", 0 }, - { "ignored", "Ignoring {hilight $1} from {nick $0}", 2, { 0, 0 } }, + { "ignored", "Ignoring {hilight $1} from {nick $0} [$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 }, |