1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

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
This commit is contained in:
Emanuele Giaquinta 2008-03-14 18:57:58 +00:00 committed by exg
parent aea2e737f9
commit dee3b35ba2

View File

@ -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)
{