Don't take a users coins when they make an invalid roulette bet (coins.py)

This commit is contained in:
jesopo 2019-02-05 23:00:56 +00:00
parent aa7aa17ec1
commit 13083e60a6

View file

@ -331,8 +331,6 @@ class Module(ModuleManager.BaseModule):
raise utils.EventError("%s: You don't have enough coins to bet" %
event["user"].nickname)
self._take(event["server"], event["user"], bet_amount_total)
# black, red, odds, evens, low (1-18), high (19-36)
# 1dozen (1-12), 2dozen (13-24), 3dozen (25-36)
# 1column (1,4..34), 2column (2,5..35), 3column (3,6..36)
@ -403,6 +401,8 @@ class Module(ModuleManager.BaseModule):
else:
winnings[bet] = [odds, bet_amounts[i]]
self._take(event["server"], event["user"], bet_amount_total)
winnings_str = ["%s for %s (%d to 1)" % (
winnings[bet][1]*winnings[bet][0],
bet,