mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
core/ignore: fix ignore_match_level handling of flag levels
This commit is contained in:
parent
b382bd1232
commit
d84a24444f
@ -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