From 1ea9fe1b4cd5618b3da7adcd36a16f2af19ba648 Mon Sep 17 00:00:00 2001 From: James Vega Date: Mon, 7 Mar 2005 00:30:01 +0000 Subject: [PATCH] Catch an exception when dice with 0 sides are specified. --- plugins/Games/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Games/plugin.py b/plugins/Games/plugin.py index 2fa78605e..7f53c6067 100644 --- a/plugins/Games/plugin.py +++ b/plugins/Games/plugin.py @@ -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):