mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Added supybot.plugins.AutoMode.owner, so the bot can choose not to automode owners.
This commit is contained in:
parent
db615f2c40
commit
ad25afa900
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user