From b7028c6447f53013a962ef86b59308f99e9706e6 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 20 Dec 2013 11:02:38 +1100 Subject: [PATCH] profile: fix multi-cond rule matching. --- lib/profile.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/profile.py b/lib/profile.py index 42780fe..3f77bb9 100644 --- a/lib/profile.py +++ b/lib/profile.py @@ -85,9 +85,12 @@ def rule_matches(rule, event, who, when): continue return False + c = False for w in who.split(' '): if w[-8:] == r[-8:]: - continue + c = True + if c: + continue tm = time.localtime() a = day_match(r, tm) @@ -98,6 +101,9 @@ def rule_matches(rule, event, who, when): a = time_match(r, tm) if a == False: return False + if a == True: + continue + return False return True -- 2.39.5