1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-08 04:26:01 -04:00

Better message for /IGNORE

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2946 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-10-14 11:57:01 +00:00 committed by cras
parent 9ab017b3fa
commit 45883d7f36
2 changed files with 11 additions and 13 deletions

View File

@ -68,10 +68,15 @@ static void ignore_print(int index, IGNORE_REC *rec)
if (options->len > 1) g_string_truncate(options, options->len-1); if (options->len > 1) g_string_truncate(options, options->len-1);
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, if (index >= 0) {
TXT_IGNORE_LINE, index, printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
key != NULL ? key : "", TXT_IGNORE_LINE, index, key != NULL ? key : "",
levels != NULL ? levels : "", options->str); 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_string_free(options, TRUE);
g_free(key); g_free(key);
g_free(levels); g_free(levels);
@ -221,14 +226,7 @@ static void cmd_unignore(const char *data)
static void sig_ignore_created(IGNORE_REC *rec) static void sig_ignore_created(IGNORE_REC *rec)
{ {
char *key, *levels; ignore_print(-1, rec);
key = ignore_get_key(rec);
levels = bits2level(rec->level);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
TXT_IGNORED, key, levels);
g_free(key);
g_free(levels);
} }
static void sig_ignore_destroyed(IGNORE_REC *rec) static void sig_ignore_destroyed(IGNORE_REC *rec)

View File

@ -233,7 +233,7 @@ FORMAT_REC fecommon_core_formats[] = {
/* ---- */ /* ---- */
{ NULL, "Ignores", 0 }, { 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 } }, { "unignored", "Unignored {nick $0}", 1, { 0 } },
{ "ignore_not_found", "{nick $0} is not being ignored", 1, { 0 } }, { "ignore_not_found", "{nick $0} is not being ignored", 1, { 0 } },
{ "ignore_no_ignores", "There are no ignores", 0 }, { "ignore_no_ignores", "There are no ignores", 0 },