AutoMode: fix supybot.plugins.AutoMode.owner. Closes GH-36.

This commit is contained in:
Valentin Lorentz 2011-06-27 11:24:50 +02:00
parent ca61dd0ed2
commit 128143f856
2 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,7 @@ conf.registerChannelValue(AutoMode, 'enable',
""")))
conf.registerGlobalValue(AutoMode, 'owner',
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',
registry.Boolean(False, _("""Determines whether the bot will "fall
through" to halfop/voicing when auto-opping is turned off but

View File

@ -51,7 +51,8 @@ class AutoMode(callbacks.Plugin):
fallthrough = self.registryValue('fallthrough', channel)
def do(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):
self.log.info('Sending auto-%s of %s in %s.',
type, msg.prefix, channel)