don't permit 0-coin flips
This commit is contained in:
parent
b24e37fed6
commit
fed2d64739
1 changed files with 2 additions and 1 deletions
|
@ -85,7 +85,8 @@ class Module(object):
|
|||
side_name = event["args_split"][0].lower()
|
||||
coin_bet = event["args_split"][1]
|
||||
|
||||
if not REGEX_FLOAT.match(coin_bet):
|
||||
if not REGEX_FLOAT.match(coin_bet) or decimal.Decimal(
|
||||
coin_bet) <= DECIMAL_ZERO:
|
||||
event["stderr"].write("Please provide a number of coins to bet")
|
||||
return
|
||||
coin_bet = decimal.Decimal(coin_bet)
|
||||
|
|
Loading…
Reference in a new issue