mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-24 02:54:05 +01:00
AutoMode: fix supybot.plugins.AutoMode.owner. Closes GH-36.
This commit is contained in:
parent
ca61dd0ed2
commit
128143f856
@ -47,7 +47,7 @@ conf.registerChannelValue(AutoMode, 'enable',
|
|||||||
""")))
|
""")))
|
||||||
conf.registerGlobalValue(AutoMode, 'owner',
|
conf.registerGlobalValue(AutoMode, 'owner',
|
||||||
registry.Boolean(True, _("""Determines whether this plugin will automode
|
registry.Boolean(True, _("""Determines whether this plugin will automode
|
||||||
owners.""")))
|
owners even if they don't have op/halfop/voice/whatever capability.""")))
|
||||||
conf.registerChannelValue(AutoMode, 'fallthrough',
|
conf.registerChannelValue(AutoMode, 'fallthrough',
|
||||||
registry.Boolean(False, _("""Determines whether the bot will "fall
|
registry.Boolean(False, _("""Determines whether the bot will "fall
|
||||||
through" to halfop/voicing when auto-opping is turned off but
|
through" to halfop/voicing when auto-opping is turned off but
|
||||||
|
@ -51,7 +51,8 @@ class AutoMode(callbacks.Plugin):
|
|||||||
fallthrough = self.registryValue('fallthrough', channel)
|
fallthrough = self.registryValue('fallthrough', channel)
|
||||||
def do(type):
|
def do(type):
|
||||||
cap = ircdb.makeChannelCapability(channel, type)
|
cap = ircdb.makeChannelCapability(channel, type)
|
||||||
if ircdb.checkCapability(msg.prefix, cap, ignoreOwner=True):
|
if ircdb.checkCapability(msg.prefix, cap,
|
||||||
|
ignoreOwner=not self.registryValue('owner')):
|
||||||
if self.registryValue(type, channel):
|
if self.registryValue(type, channel):
|
||||||
self.log.info('Sending auto-%s of %s in %s.',
|
self.log.info('Sending auto-%s of %s in %s.',
|
||||||
type, msg.prefix, channel)
|
type, msg.prefix, channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user