Revert "AutoMode: Disable overriding rights of auto* capabilities."

This reverts commit 4a20270655.
This commit is contained in:
Valentin Lorentz 2013-12-27 14:21:12 +00:00
parent 0ecdb87aef
commit f1c13054fe

View File

@ -55,19 +55,18 @@ class AutoMode(callbacks.Plugin):
def do(type): def do(type):
cap = ircdb.makeChannelCapability(channel, type) cap = ircdb.makeChannelCapability(channel, type)
cap_auto = ircdb.makeChannelCapability(channel, 'auto'+type) cap_auto = ircdb.makeChannelCapability(channel, 'auto'+type)
apply_mode = False
try: try:
apply_mode |= ircdb.checkCapability(msg.prefix, cap, apply_mode = ircdb.checkCapability(msg.prefix, cap,
ignoreOwner=not self.registryValue('owner')) ignoreOwner=not self.registryValue('owner'))
except KeyError: except KeyError:
pass apply_mode = False
try: try:
apply_mode |= ircdb.checkCapability(msg.prefix, cap_auto, override = ircdb.checkCapability(msg.prefix, cap_auto,
ignoreOwner=not self.registryValue('owner')) ignoreOwner=not self.registryValue('owner'))
except KeyError: except KeyError:
pass override = False
if apply_mode: if apply_mode or override:
if self.registryValue(type, channel): if override or self.registryValue(type, channel):
self.log.info('Scheduling auto-%s of %s in %s.', self.log.info('Scheduling auto-%s of %s in %s.',
type, msg.prefix, channel) type, msg.prefix, channel)
def dismiss(): def dismiss():