From 154fbc30e9a8a4e4a38ef0847650d7fd24f1862b Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 9 Sep 2010 00:00:47 -0400 Subject: [PATCH] Games: Re-add some, much higher, upper limits to dice. Signed-off-by: James Vega --- plugins/Games/plugin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/Games/plugin.py b/plugins/Games/plugin.py index 427880193..203bb9fd5 100644 --- a/plugins/Games/plugin.py +++ b/plugins/Games/plugin.py @@ -58,7 +58,11 @@ class Games(callbacks.Plugin): ten-sided dice. """ (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.') else: L = [0] * dice