From 13083e60a64fd52405c10407a11f446153a11b2b Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 5 Feb 2019 23:00:56 +0000 Subject: [PATCH] Don't take a users coins when they make an invalid roulette bet (coins.py) --- modules/coins.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/coins.py b/modules/coins.py index 11850a55..13b3ef15 100644 --- a/modules/coins.py +++ b/modules/coins.py @@ -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,