mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
AutoMode: Disable overriding rights of auto* capabilities.
This commit is contained in:
parent
19066b62a3
commit
4a20270655
@ -55,18 +55,19 @@ 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:
|
||||||
apply_mode = False
|
pass
|
||||||
try:
|
try:
|
||||||
override = ircdb.checkCapability(msg.prefix, cap_auto,
|
apply_mode |= ircdb.checkCapability(msg.prefix, cap_auto,
|
||||||
ignoreOwner=not self.registryValue('owner'))
|
ignoreOwner=not self.registryValue('owner'))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
override = False
|
pass
|
||||||
if apply_mode or override:
|
if apply_mode:
|
||||||
if override or self.registryValue(type, channel):
|
if 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():
|
||||||
|
Loading…
Reference in New Issue
Block a user