mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-04-26 09:47:52 +02:00
AutoMode: Fix traceback since b5c99b1c.
This commit is contained in:
parent
fc9daa9953
commit
12b8e44dc7
@ -52,19 +52,22 @@ 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,
|
try:
|
||||||
ignoreOwner=not self.registryValue('owner')):
|
if ircdb.checkCapability(msg.prefix, cap,
|
||||||
if self.registryValue(type, channel):
|
ignoreOwner=not self.registryValue('owner')):
|
||||||
self.log.info('Scheduling auto-%s of %s in %s.',
|
if self.registryValue(type, channel):
|
||||||
type, msg.prefix, channel)
|
self.log.info('Scheduling auto-%s of %s in %s.',
|
||||||
msgmaker = getattr(ircmsgs, type)
|
type, msg.prefix, channel)
|
||||||
schedule_msg(msgmaker(channel, msg.nick))
|
msgmaker = getattr(ircmsgs, type)
|
||||||
raise Continue # Even if fallthrough, let's only do one.
|
schedule_msg(msgmaker(channel, msg.nick))
|
||||||
elif not fallthrough:
|
raise Continue # Even if fallthrough, let's only do one.
|
||||||
self.log.debug('%s has %s, but supybot.plugins.AutoMode.%s'
|
elif not fallthrough:
|
||||||
' is not enabled in %s, refusing to fall '
|
self.log.debug('%s has %s, but supybot.plugins.AutoMode.%s'
|
||||||
'through.', msg.prefix, cap, type, channel)
|
' is not enabled in %s, refusing to fall '
|
||||||
raise Continue
|
'through.', msg.prefix, cap, type, channel)
|
||||||
|
raise Continue
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
def schedule_msg(msg):
|
def schedule_msg(msg):
|
||||||
def f():
|
def f():
|
||||||
irc.queueMsg(msg)
|
irc.queueMsg(msg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user