mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Merge pull request #892 from dwfreed/fix-ignore-flags
core/ignore: fix ignore_match_level handling of flag levels
This commit is contained in:
commit
0c94d44f52
@ -82,11 +82,17 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text)
|
|||||||
* However we also want to allow NO_ACT combined with levels, so mask it out and
|
* However we also want to allow NO_ACT combined with levels, so mask it out and
|
||||||
* match levels if set. */
|
* match levels if set. */
|
||||||
#define FLAG_MSGLEVELS ( MSGLEVEL_NO_ACT | MSGLEVEL_HIDDEN )
|
#define FLAG_MSGLEVELS ( MSGLEVEL_NO_ACT | MSGLEVEL_HIDDEN )
|
||||||
#define ignore_match_level(rec, level) \
|
static int ignore_match_level(IGNORE_REC *rec, int level)
|
||||||
(((level & FLAG_MSGLEVELS) != 0) ? \
|
{
|
||||||
((~FLAG_MSGLEVELS & level) & (rec)->level) != 0 : \
|
if (level & FLAG_MSGLEVELS) {
|
||||||
((rec)->level & FLAG_MSGLEVELS ? 0 : \
|
int flaglevel = level & FLAG_MSGLEVELS;
|
||||||
(level & (rec)->level) != 0))
|
return (level & rec->level) && (flaglevel & rec->level);
|
||||||
|
} else if (!(rec->level & FLAG_MSGLEVELS)) {
|
||||||
|
return (level & rec->level);
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define ignore_match_nickmask(rec, nick, nickmask) \
|
#define ignore_match_nickmask(rec, nick, nickmask) \
|
||||||
((rec)->mask == NULL || \
|
((rec)->mask == NULL || \
|
||||||
|
Loading…
Reference in New Issue
Block a user