mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-10-07 03:48:41 +02:00
Style updates, basically, and some slight functionality changes.
This commit is contained in:
parent
2c05cac06d
commit
b3ddef0105
@ -333,10 +333,8 @@ class Fun(callbacks.Privmsg):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# The list of words and algorithm are pulled straight the mozbot
|
# The list of words and algorithm are pulled straight the mozbot
|
||||||
# MagicEightBall.bm module.
|
# MagicEightBall.bm module.
|
||||||
#
|
|
||||||
_responses = {'positive': ['It is possible.', 'Yes!', 'Of course.',
|
_responses = {'positive': ['It is possible.', 'Yes!', 'Of course.',
|
||||||
'Naturally.', 'Obviously.', 'It shall be.',
|
'Naturally.', 'Obviously.', 'It shall be.',
|
||||||
'The outlook is good.', 'It is so.',
|
'The outlook is good.', 'It is so.',
|
||||||
@ -361,18 +359,18 @@ class Fun(callbacks.Privmsg):
|
|||||||
category = 'negative'
|
category = 'negative'
|
||||||
else:
|
else:
|
||||||
category = 'unknown'
|
category = 'unknown'
|
||||||
response = self._responses[category][ int(time.time()) % len(self._responses[category]) ]
|
return random.choice(self._responses[category])
|
||||||
return response
|
|
||||||
|
|
||||||
def eightball(self, irc, msg, args):
|
def eightball(self, irc, msg, args):
|
||||||
"""[<question>]
|
"""[<question>]
|
||||||
|
|
||||||
Ask a question and the answer shall be provided.
|
Ask a question and the answer shall be provided.
|
||||||
"""
|
"""
|
||||||
if len(args) == 0:
|
text = privmsgs.getArgs(args, required=0, optional=1)
|
||||||
irc.reply(self._checkTheBall(2) )
|
if text:
|
||||||
|
irc.reply(self._checkTheBall(len(text)))
|
||||||
else:
|
else:
|
||||||
irc.reply(self._checkTheBall(len(string.join(args,' '))) )
|
irc.reply(self._checkTheBall(random.randrange(0, 3)))
|
||||||
|
|
||||||
_rouletteChamber = random.randrange(0, 6)
|
_rouletteChamber = random.randrange(0, 6)
|
||||||
_rouletteBullet = random.randrange(0, 6)
|
_rouletteBullet = random.randrange(0, 6)
|
||||||
|
Loading…
Reference in New Issue
Block a user