mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05: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:
parent
aea2e737f9
commit
dee3b35ba2
@ -58,6 +58,10 @@ static int ignore_check_replies_rec(IGNORE_REC *rec, CHANNEL_REC *channel,
|
|||||||
return FALSE;
|
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)
|
static int ignore_check_replies(CHANNEL_REC *chanrec, const char *text)
|
||||||
{
|
{
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
@ -70,6 +74,7 @@ static int ignore_check_replies(CHANNEL_REC *chanrec, const char *text)
|
|||||||
IGNORE_REC *rec = tmp->data;
|
IGNORE_REC *rec = tmp->data;
|
||||||
|
|
||||||
if (rec->mask != NULL && rec->replies &&
|
if (rec->mask != NULL && rec->replies &&
|
||||||
|
ignore_match_channel(rec, chanrec->name) &&
|
||||||
ignore_check_replies_rec(rec, chanrec, text))
|
ignore_check_replies_rec(rec, chanrec, text))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -112,10 +117,6 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text)
|
|||||||
((rec)->servertag == NULL || \
|
((rec)->servertag == NULL || \
|
||||||
g_strcasecmp((server)->tag, (rec)->servertag) == 0)
|
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,
|
int ignore_check(SERVER_REC *server, const char *nick, const char *host,
|
||||||
const char *channel, const char *text, int level)
|
const char *channel, const char *text, int level)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user