Skip to content
Browse files

[8Ball] Feed single-item 'Should I' options to the oracle. Blame @sienf

  • Loading branch information...
aquarion committed Jan 31, 2012
1 parent b86e455 commit c79e795dc2296274fd05351129afd7ad7289a0f4
Showing with 7 additions and 2 deletions.
  1. +7 −2 lampstand/reactions/
@@ -18,12 +18,17 @@ class Reaction(lampstand.reactions.base.Reaction):
uses = []

def __init__(self, connection):
self.channelMatch = re.compile('^%s. ?ask the [oracle|8.ball]' % connection.nickname, re.IGNORECASE)
self.channelMatch = (re.compile('^%s. ?ask the [oracle|8.ball]' % connection.nickname, re.IGNORECASE),
re.compile('^%s. should I .*' % connection.nickname, re.IGNORECASE))

def channelAction(self, connection, user, channel, message):
def channelAction(self, connection, user, channel, message, matchIndex):
print "[8Ball] called"

if not message.lower().find(" or ") == -1:
print "[8Ball] ... That looks like a choice to me"
return False

if self.overUsed(self.uses, self.cooldown_number, self.cooldown_time):
connection.msg(user, "The 8-ball says: 'Find a new prophet, I quit.', I'd give it a while to cool down." )

0 comments on commit c79e795

Please sign in to comment.
You can’t perform that action at this time.