From dee3b35ba2d9fcf4bb404f9c6573c23f23d5f80e Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Fri, 14 Mar 2008 18:57:58 +0000 Subject: [PATCH] Honour -channels preference for ignore -replies, fix bug #227. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4766 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/ignore.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/ignore.c b/src/core/ignore.c index a954443c..f69a900e 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -58,6 +58,10 @@ static int ignore_check_replies_rec(IGNORE_REC *rec, CHANNEL_REC *channel, return FALSE; } +#define ignore_match_channel(rec, channel) \ + ((rec)->channels == NULL || ((channel) != NULL && \ + strarray_find((rec)->channels, (channel)) != -1)) + static int ignore_check_replies(CHANNEL_REC *chanrec, const char *text) { GSList *tmp; @@ -70,6 +74,7 @@ static int ignore_check_replies(CHANNEL_REC *chanrec, const char *text) IGNORE_REC *rec = tmp->data; if (rec->mask != NULL && rec->replies && + ignore_match_channel(rec, chanrec->name) && ignore_check_replies_rec(rec, chanrec, text)) return TRUE; } @@ -112,10 +117,6 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text) ((rec)->servertag == NULL || \ g_strcasecmp((server)->tag, (rec)->servertag) == 0) -#define ignore_match_channel(rec, channel) \ - ((rec)->channels == NULL || ((channel) != NULL && \ - strarray_find((rec)->channels, (channel)) != -1)) - int ignore_check(SERVER_REC *server, const char *nick, const char *host, const char *channel, const char *text, int level) {