From f1c13054feff62437568a67e9b66392c7f91cf10 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 27 Dec 2013 14:21:12 +0000 Subject: [PATCH] Revert "AutoMode: Disable overriding rights of auto* capabilities." This reverts commit 4a20270655aa898ce8fdd36c225056607645db46. --- plugins/AutoMode/plugin.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/AutoMode/plugin.py b/plugins/AutoMode/plugin.py index 04d679a5a..daff77dab 100644 --- a/plugins/AutoMode/plugin.py +++ b/plugins/AutoMode/plugin.py @@ -55,19 +55,18 @@ class AutoMode(callbacks.Plugin): def do(type): cap = ircdb.makeChannelCapability(channel, type) cap_auto = ircdb.makeChannelCapability(channel, 'auto'+type) - apply_mode = False try: - apply_mode |= ircdb.checkCapability(msg.prefix, cap, + apply_mode = ircdb.checkCapability(msg.prefix, cap, ignoreOwner=not self.registryValue('owner')) except KeyError: - pass + apply_mode = False try: - apply_mode |= ircdb.checkCapability(msg.prefix, cap_auto, + override = ircdb.checkCapability(msg.prefix, cap_auto, ignoreOwner=not self.registryValue('owner')) except KeyError: - pass - if apply_mode: - if self.registryValue(type, channel): + override = False + if apply_mode or override: + if override or self.registryValue(type, channel): self.log.info('Scheduling auto-%s of %s in %s.', type, msg.prefix, channel) def dismiss():