Fix special case of INVITE command, enhance stock ticker regexp

This commit is contained in:
Neale Pickett 2009-04-30 13:49:01 -05:00
parent 08802c0c55
commit 89368a8aae
2 changed files with 7 additions and 2 deletions

View File

@ -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<symbol>[-.a-zA-Z]+)$"),
bindings.append((re.compile(r"^quote +(?P<symbol>[-^.a-zA-Z]+)$"),
quote))
def currency(self, sender, forum, addl, match):

5
irc.py
View File

@ -397,6 +397,11 @@ class SmartIRCHandler(IRCHandler):
sender = self.recipient(args[2])
addl = (unpack_nuhost(args)[0],)
elif op in ("INVITE",):
# 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: