From 5436446814ec126b5209e35a7258d7373bdbb820 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Wed, 1 Mar 2017 10:05:42 +0000 Subject: [PATCH] Fixed comparing PermissionOverwrites pairs. --- bot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 9109094..6d0f176 100644 --- a/bot.py +++ b/bot.py @@ -502,9 +502,10 @@ def lower_role_on_server_than(server, id, *, strict = False): def equal_permissions(x, y, *, strict = True): if x == y: return True - if x.is_subset(y) and not strict: - return True - return False + if strict: + return False + # (allow, deny) + return x[0].is_subset(y[0]) and x[1].is_superset(y[1]) @asyncio.coroutine def overwrite_permissions(channel, whom, overwrite, *, strict = True): -- 2.7.4