From 89368a8aae2a6eae020aa07e62e4600b3736486e Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 30 Apr 2009 13:49:01 -0500 Subject: [PATCH] Fix special case of INVITE command, enhance stock ticker regexp --- firebot.py | 2 +- irc.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/firebot.py b/firebot.py index 374c56e..a10940c 100755 --- a/firebot.py +++ b/firebot.py @@ -329,7 +329,7 @@ class FireBot(infobot.InfoBot, procbot.ProcBot): symbol = match.group('symbol') WebRetriever('http://download.finance.yahoo.com/d/quotes.csv?s=%s&f=sl1d1t1c1ohgvj1pp2owern&e=.csv' % symbol, cb) - bindings.append((re.compile(r"^quote +(?P[-.a-zA-Z]+)$"), + bindings.append((re.compile(r"^quote +(?P[-^.a-zA-Z]+)$"), quote)) def currency(self, sender, forum, addl, match): diff --git a/irc.py b/irc.py index f70b3d0..b725984 100644 --- a/irc.py +++ b/irc.py @@ -397,7 +397,12 @@ class SmartIRCHandler(IRCHandler): sender = self.recipient(args[2]) addl = (unpack_nuhost(args)[0],) elif op in ("INVITE",): - forum = self.recipient(text) + # INVITE [u'pflarr!~pflarr@www.clanspum.net', u'INVITE', u'gallium', u'#mysterious'] + # INVITE [u'pflarr!~pflarr@www.clanspum.net', u'INVITE', u'gallium'] #mysterious + if len(args) > 3: + forum = self.recipient(args[3]) + else: + forum = self.recipient(text) else: try: int(op)