Added eightball command.

This commit is contained in:
Jeremy Fincher 2003-08-29 07:49:11 +00:00
parent 465ab3a591
commit feff6f77ce
1 changed files with 29 additions and 0 deletions

View File

@ -727,6 +727,35 @@ class FunCommands(callbacks.Privmsg):
irc.queueMsg(ircmsgs.privmsg(target, s))
raise callbacks.CannotNest
_eightballs = [
'outlook not so good.',
'my reply is no.',
'don\'t count on it.',
'you may rely on it.',
'ask again later.',
'most likely.',
'cannot predict now.',
'yes.',
'yes, most definitely.',
'better not tell you now.',
'it is certain.',
'very doubtful.',
'it is decidedly so.',
'concentrate and ask again.',
'signs point to yes.',
'my sources say no.',
'without a doubt.',
'reply hazy, try again.',
'as I see it, yes.',
]
def eightball(self, irc, msg, args):
"""[<question>]
Asks the magic eightball a question.
"""
irc.reply(msg, random.sample(self._eightballs, 1)[0])
def dns(self, irc, msg, args):
"""<host|ip>"""
host = privmsgs.getArgs(args)