Added supybot.plugins.AutoMode.owner, so the bot can choose not to automode owners.

This commit is contained in:
Jeremy Fincher 2009-02-05 20:22:55 +00:00 committed by James Vega
parent db615f2c40
commit ad25afa900
2 changed files with 5 additions and 0 deletions

View File

@ -42,6 +42,8 @@ def configure(advanced):
AutoMode = conf.registerPlugin('AutoMode')
conf.registerChannelValue(AutoMode, 'enable',
registry.Boolean(True, """Determines whether this plugin is enabled."""))
conf.registerGlobalValue(AutoMode, 'owner',
registry.Boolean(True, """Determines whether this plugin will automode owners."""))
conf.registerChannelValue(AutoMode, 'fallthrough',
registry.Boolean(False, """Determines whether the bot will "fall through" to
halfop/voicing when auto-opping is turned off but auto-halfopping/voicing

View File

@ -48,6 +48,9 @@ class AutoMode(callbacks.Plugin):
return
fallthrough = self.registryValue('fallthrough', channel)
def do(type):
if ircdb.checkCapability(msg.prefix, 'owner') and not \
self.registryValue('owner'):
raise Continue
cap = ircdb.makeChannelCapability(channel, type)
if ircdb.checkCapability(msg.prefix, cap):
if self.registryValue(type, channel):