summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-11 10:54:15 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-11 10:54:15 +0000
commit1b736a68a7b476394a24a6031db4b2b4d716b5de (patch)
tree4668087fcf075a6c940d35e5b7f566ebff3c8c3e /src
parent767aadfb7f53c4664bc3da560e44649aaf118a91 (diff)
downloadirssi-1b736a68a7b476394a24a6031db4b2b4d716b5de.zip
/IGNORE didn't show if it had -replies flag
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@462 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/irc/fe-ignore.c14
-rw-r--r--src/fe-common/irc/module-formats.c2
2 files changed, 11 insertions, 5 deletions
diff --git a/src/fe-common/irc/fe-ignore.c b/src/fe-common/irc/fe-ignore.c
index 4cb0cf2b..b926e351 100644
--- a/src/fe-common/irc/fe-ignore.c
+++ b/src/fe-common/irc/fe-ignore.c
@@ -104,17 +104,23 @@ static void ignore_split_levels(const char *levels, int *level, int *xlevel)
static void ignore_print(int index, IGNORE_REC *rec)
{
+ GString *options;
char *key, *levels;
key = ignore_get_key(rec);
levels = ignore_get_levels(rec->level, rec->except_level);
+
+ options = g_string_new(NULL);
+ if (rec->regexp) g_string_sprintfa(options, "-regexp ");
+ if (rec->fullword) g_string_sprintfa(options, "-word ");
+ if (rec->replies) g_string_sprintfa(options, "-replies ");
+ if (options->len > 1) g_string_truncate(options, options->len-1);
+
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
IRCTXT_IGNORE_LINE, index,
key != NULL ? key : "",
- levels != NULL ? levels : "",
- rec->regexp ? " -regexp" : "",
- rec->fullword ? " -word" : "",
- rec->replies ? " -replies" : "");
+ levels != NULL ? levels : "", options->str);
+ g_string_free(options, TRUE);
g_free(key);
g_free(levels);
}
diff --git a/src/fe-common/irc/module-formats.c b/src/fe-common/irc/module-formats.c
index 05f431a4..283d95cf 100644
--- a/src/fe-common/irc/module-formats.c
+++ b/src/fe-common/irc/module-formats.c
@@ -196,7 +196,7 @@ FORMAT_REC fecommon_irc_formats[] = {
{ "ignore_not_found", "%_$0%_ is not being ignored", 1, { 0 } },
{ "ignore_no_ignores", "There are no ignores", 0 },
{ "ignore_header", "Ignorance List:", 0 },
- { "ignore_line", "$[-4]0 $1: $2 $3 $4", 5, { 1, 0, 0, 0, 0 } },
+ { "ignore_line", "$[-4]0 $1: $2 $3 $4", 4, { 1, 0, 0, 0 } },
{ "ignore_footer", "", 0 },
{ "talking_in", "You are now talking in %_$0%_", 1, { 0 } },
{ "query_start", "Starting query with %_$0%_", 1, { 0 } },