diff options
author | Timo Sirainen <cras@irssi.org> | 2001-07-15 14:50:26 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-07-15 14:50:26 +0000 |
commit | c1ac5765b3e2ac90dd20294dbe1c39362e2bbc40 (patch) | |
tree | 9dd38d5918f686fabb178d58b01713c87756c0b1 | |
parent | 316bd7d14271fdd9524175ed309a0622340b127d (diff) | |
download | irssi-c1ac5765b3e2ac90dd20294dbe1c39362e2bbc40.zip |
New /IGNOREs weren't immediately effective for nicks in channel. Some small
fixes for unignoring levels with /IGNORE.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1630 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/core/ignore.c | 1 | ||||
-rw-r--r-- | src/fe-common/core/fe-ignore.c | 19 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c index 69460c5b..f008df3f 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -329,6 +329,7 @@ void ignore_add_rec(IGNORE_REC *rec) ignore_set_config(rec); signal_emit("ignore created", 1, rec); + nickmatch_rebuild(nickmatch); } static void ignore_destroy(IGNORE_REC *rec, int send_signal) diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index 3523d527..cb2b40ac 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -134,6 +134,18 @@ static void cmd_ignore(const char *data) } rec->level = combine_level(rec->level, levels); + + if (new_ignore && rec->level == 0) { + /* tried to unignore levels from nonexisting ignore */ + printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, + TXT_IGNORE_NOT_FOUND, rec->mask); + g_free(rec->mask); + g_strfreev(rec->channels); + g_free(rec); + cmd_params_free(free_arg); + return; + } + rec->pattern = (patternarg == NULL || *patternarg == '\0') ? NULL : g_strdup(patternarg); rec->exception = g_hash_table_lookup(optlist, "except") != NULL; @@ -144,11 +156,6 @@ static void cmd_ignore(const char *data) if (timestr != NULL) rec->unignore_time = time(NULL)+atoi(timestr); - if (rec->level == 0) { - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_UNIGNORED, - rec->mask == NULL ? "*" : rec->mask); - } - if (new_ignore) ignore_add_rec(rec); else @@ -196,7 +203,7 @@ static void sig_ignore_created(IGNORE_REC *rec) char *key, *levels; key = ignore_get_key(rec); - levels = bits2level(rec->level); + levels = bits2level(rec->level); printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_IGNORED, key, levels); g_free(key); |