From 14ccde73a2ca75529071e40a8f025963d28ab94f Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 21 Nov 2009 11:16:08 +0800 Subject: [PATCH] Fix Playerstats for Pot Limit Still broken for cap games. Need a more flexible mechanism for this --- pyfpdb/GuiPlayerStats.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyfpdb/GuiPlayerStats.py b/pyfpdb/GuiPlayerStats.py index 53eac73f..d65b9ab6 100644 --- a/pyfpdb/GuiPlayerStats.py +++ b/pyfpdb/GuiPlayerStats.py @@ -480,6 +480,7 @@ class GuiPlayerStats (threading.Thread): query = query.replace('', '') lims = [int(x) for x in limits if x.isdigit()] + potlims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'pl'] nolims = [int(x[0:-2]) for x in limits if len(x) > 2 and x[-2:] == 'nl'] bbtest = "and ( (gt.limitType = 'fl' and gt.bigBlind in " # and ( (limit and bb in()) or (nolimit and bb in ()) ) @@ -490,6 +491,14 @@ class GuiPlayerStats (threading.Thread): bbtest = bbtest + blindtest + ' ) ' else: bbtest = bbtest + '(-1) ) ' + bbtest = bbtest + " or (gt.limitType = 'pl' and gt.bigBlind in " + if potlims: + blindtest = str(tuple(potlims)) + blindtest = blindtest.replace("L", "") + blindtest = blindtest.replace(",)",")") + bbtest = bbtest + blindtest + ' ) ' + else: + bbtest = bbtest + '(-1) ) ' bbtest = bbtest + " or (gt.limitType = 'nl' and gt.bigBlind in " if nolims: blindtest = str(tuple(nolims))