mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 14:10:41 +01:00
Games: Remove arbitrary upper limits on dice command.
Closes: Sf#3057255 Signed-off-by: James Vega <jamessan@users.sourceforge.net> (cherry picked from commit 7cf61ad04643c3c9f795f06f0886ee25c2923472) Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
parent
246c73eed2
commit
961786f362
@ -1,5 +1,6 @@
|
|||||||
###
|
###
|
||||||
# Copyright (c) 2003-2005, Jeremiah Fincher
|
# Copyright (c) 2003-2005, Jeremiah Fincher
|
||||||
|
# Copyright (c) 2010, James Vega
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -57,11 +58,7 @@ 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 dice > 6:
|
if sides < 3:
|
||||||
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 fewer than 3 sides.')
|
irc.error('Dice can\'t have fewer than 3 sides.')
|
||||||
else:
|
else:
|
||||||
L = [0] * dice
|
L = [0] * dice
|
||||||
|
Loading…
x
Reference in New Issue
Block a user