summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2008-03-14 18:57:58 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2008-03-14 18:57:58 +0000
commitdee3b35ba2d9fcf4bb404f9c6573c23f23d5f80e (patch)
tree03be9dad48cd496beb2be1b33d398ec8e0594e1e /src
parentaea2e737f96078337567f1e16ec087a0ef55a054 (diff)
downloadirssi-dee3b35ba2d9fcf4bb404f9c6573c23f23d5f80e.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/core/ignore.c9
1 files 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)
{