From 517cd03eeccc34d36fde32020b162ba4490ca1c3 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 7 Dec 2004 07:38:27 +0000 Subject: [PATCH] Fixed some fallthrough handling. --- plugins/AutoMode.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/AutoMode.py b/plugins/AutoMode.py index b16548816..a4eeb13ef 100644 --- a/plugins/AutoMode.py +++ b/plugins/AutoMode.py @@ -96,13 +96,18 @@ class AutoMode(callbacks.Privmsg): return fallthrough = self.registryValue('fallthrough', channel) def do(type): - if self.registryValue(type, channel): - cap = ircdb.makeChannelCapability(channel, type) - if ircdb.checkCapability(msg.prefix, cap): + cap = ircdb.makeChannelCapability(channel, type) + 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) irc.queueMsg(msgmaker(channel, msg.nick)) raise Continue # Even if fallthrough, let's only do one. 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 try: do('op')