From 3cd51ca99010d70010ae1e2b8fc11c9e78464165 Mon Sep 17 00:00:00 2001 From: Gerko de Roo Date: Fri, 22 Jan 2010 23:42:44 +0100 Subject: [PATCH] Added freeroll support for Pokerstars --- pyfpdb/PokerStarsToFpdb.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index 09bd0390..03c70845 100755 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -46,9 +46,9 @@ class PokerStars(HandHistoryConverter): PokerStars\sGame\s\#(?P[0-9]+):\s+ (Tournament\s\# # open paren of tournament info (?P\d+),\s - (?P[%(LS)s\+\d\.]+ # here's how I plan to use LS - \s?(?P%(LEGAL_ISO)s)? - )\s)? # close paren of tournament info + # here's how I plan to use LS + (?P([%(LS)s\+\d\.]+\s?(?P%(LEGAL_ISO)s)?)|Freeroll)\s+)? + # close paren of tournament info (?PHORSE|8\-Game|HOSE)?\s?\(? (?PHold\'em|Razz|7\sCard\sStud|7\sCard\sStud\sHi/Lo|Omaha|Omaha\sHi/Lo|Badugi|Triple\sDraw\s2\-7\sLowball|5\sCard\sDraw)\s (?PNo\sLimit|Limit|Pot\sLimit)\)?,?\s @@ -205,9 +205,12 @@ class PokerStars(HandHistoryConverter): if key == 'TOURNO': hand.tourNo = info[key] if key == 'BUYIN': - #FIXME: The key looks like: '€0.82+€0.18 EUR' - # This should be parsed properly and used - hand.buyin = info[key] + if info[key] == 'Freeroll': + hand.buyin = '$0+$0' + else: + #FIXME: The key looks like: '€0.82+€0.18 EUR' + # This should be parsed properly and used + hand.buyin = info[key] if key == 'LEVEL': hand.level = info[key]