From 73a3bd91bd249185a756f33afb3908339f6c1183 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Thu, 29 Jan 2015 20:17:25 +0000 Subject: [PATCH] bookie: compare new bet amount with total for player, not the whole book --- tipbot/modules/bookie.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tipbot/modules/bookie.py b/tipbot/modules/bookie.py index 4709ab8..20a8f3f 100644 --- a/tipbot/modules/bookie.py +++ b/tipbot/modules/bookie.py @@ -326,7 +326,7 @@ def Bet(link,cmd): p.hincrby(tname,identity+":units",units) p.sadd(tname+":bettors",identity) p.execute() - total_bet=long(redis_hget(tname,"bets")) + total_bet=long(redis_hget(tname,identity+":units")) if total_bet == units: link.send("%s has bet %s on %s for %s" % (NickFromIdentity(identity), AmountToString(units), outcome, book_name)) else: