summaryrefslogtreecommitdiff
path: root/src/fe-common/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-10-14 11:57:01 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-10-14 11:57:01 +0000
commit45883d7f3690bad5c8ac22692022bbfdd79262ed (patch)
tree15481e1e690da2e2a3af2b1e4063eab89dd57102 /src/fe-common/core
parent9ab017b3fa622f623f5fa325721d9da593f4e318 (diff)
downloadirssi-45883d7f3690bad5c8ac22692022bbfdd79262ed.zip
Better message for /IGNORE
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2946 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core')
-rw-r--r--src/fe-common/core/fe-ignore.c22
-rw-r--r--src/fe-common/core/module-formats.c2
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 },