From 95544ba73fa29e56bf68d6c444cbb08e24850c26 Mon Sep 17 00:00:00 2001 From: Terence Simpson Date: Sat, 9 Aug 2008 20:03:30 +0100 Subject: [PATCH] Allow @login to be used even when supybot.defaultIgnore is True --- IRCLogin/plugin.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/IRCLogin/plugin.py b/IRCLogin/plugin.py index b5873d3..b3c540c 100644 --- a/IRCLogin/plugin.py +++ b/IRCLogin/plugin.py @@ -156,6 +156,24 @@ launchpad""" irc.replySuccess() login = wrap(login) + def doPrivmsg(self, irc, msg): + if not conf.supybot.defaultIgnore: # Only do this when defaultIgnore is set + return + if chr(1) in msg.args[1]: + return + to = msg.args[0] + cmd = msg.args[1] + if to.lower() == irc.nick.lower(): + if cmd != "login": + return + elif msg.args[1][0] in conf.supybot.reply.whenAddressedBy.chars(): + cmd = msg.args[1][1:] + if cmd != "login": + return + else: + return + self._callCommand(["login"], irc, msg, []) + def do290(self, irc, msg): assert 'IDENTIFY-MSG' in msg.args[1] irc.getRealIrc()._Freenode_capabed = True