Games: Re-add some, much higher, upper limits to dice.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2010-09-09 00:00:47 -04:00
parent 45abdc8248
commit 154fbc30e9

View File

@ -58,7 +58,11 @@ class Games(callbacks.Plugin):
ten-sided dice. ten-sided dice.
""" """
(dice, sides) = utils.iter.imap(int, m.groups()) (dice, sides) = utils.iter.imap(int, m.groups())
if sides < 3: if dice > 1000:
irc.error('You can\'t roll more than 1000 dice.')
elif sides > 100:
irc.error('Dice can\'t have more than 100 sides.')
elif sides < 3:
irc.error('Dice can\'t have fewer than 3 sides.') irc.error('Dice can\'t have fewer than 3 sides.')
else: else:
L = [0] * dice L = [0] * dice