mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-06 17:44:09 +01:00
Fixed some fallthrough handling.
This commit is contained in:
parent
36095341e1
commit
517cd03eec
@ -96,13 +96,18 @@ class AutoMode(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
fallthrough = self.registryValue('fallthrough', channel)
|
fallthrough = self.registryValue('fallthrough', channel)
|
||||||
def do(type):
|
def do(type):
|
||||||
if self.registryValue(type, channel):
|
cap = ircdb.makeChannelCapability(channel, type)
|
||||||
cap = ircdb.makeChannelCapability(channel, type)
|
if ircdb.checkCapability(msg.prefix, cap):
|
||||||
if ircdb.checkCapability(msg.prefix, cap):
|
if self.registryValue(type, channel):
|
||||||
|
self.log.info('Sending auto-%s of %s in %s.',
|
||||||
|
type, msg.prefix, channel)
|
||||||
msgmaker = getattr(ircmsgs, type)
|
msgmaker = getattr(ircmsgs, type)
|
||||||
irc.queueMsg(msgmaker(channel, msg.nick))
|
irc.queueMsg(msgmaker(channel, msg.nick))
|
||||||
raise Continue # Even if fallthrough, let's only do one.
|
raise Continue # Even if fallthrough, let's only do one.
|
||||||
elif not fallthrough:
|
elif not fallthrough:
|
||||||
|
self.log.info('%s has %s, but supybot.plugins.AutoMode.%s is '
|
||||||
|
'not enabled in %s, refusing to fall through.',
|
||||||
|
msg.prefix, cap, type, channel)
|
||||||
raise Continue
|
raise Continue
|
||||||
try:
|
try:
|
||||||
do('op')
|
do('op')
|
||||||
|
Loading…
Reference in New Issue
Block a user