Catch an exception when dice with 0 sides are specified.

This commit is contained in:
James Vega 2005-03-07 00:30:01 +00:00
parent 7b46f95f19
commit 1ea9fe1b4c
1 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,8 @@ class Games(callbacks.Plugin):
irc.error('You can\'t roll more than 6 dice.')
elif sides > 100:
irc.error('Dice can\'t have more than 100 sides.')
elif sides < 3:
irc.error('Dice can\'t have less than 3 sides.')
else:
L = [0] * dice
for i in xrange(dice):