From d2e1caf7205220c9fd73861604de8248eb07f0d6 Mon Sep 17 00:00:00 2001 From: vague666 Date: Thu, 7 Jun 2018 15:17:46 +0200 Subject: simplifying code --- src/core/ignore.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/ignore.c b/src/core/ignore.c index 8aece6fc..574ecb5d 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -81,10 +81,11 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text) * used as a flag to indicate it should only look at ignore items with NO_ACT. * However we also want to allow NO_ACT combined with levels, so mask it out and * match levels if set. */ +#define FLAG_MSGLEVELS ( MSGLEVEL_NO_ACT | MSGLEVEL_HIDDEN ) #define ignore_match_level(rec, level) \ - (((level & (MSGLEVEL_NO_ACT|MSGLEVEL_HIDDEN)) != 0) ? \ - ((~(MSGLEVEL_NO_ACT|MSGLEVEL_HIDDEN) & level) & (rec)->level) != 0 : \ - ((rec)->level & (MSGLEVEL_NO_ACT|MSGLEVEL_HIDDEN) ? 0 : \ + (((level & FLAG_MSGLEVELS)!= 0) ? \ + ((~FLAG_MSGLEVELS & level) & (rec)->level) != 0 : \ + ((rec)->level & FLAG_MSGLEVELS ? 0 : \ (level & (rec)->level) != 0)) #define ignore_match_nickmask(rec, nick, nickmask) \ -- cgit v1.2.3