apologies - looks like I missed this out of my last release :-(

This commit is contained in:
sqlcoder 2009-06-17 21:43:30 +01:00
parent b935a5ad67
commit dcaf6fed27

View File

@ -21,7 +21,8 @@ import fpdb_simple
import fpdb_save_to_db
#parses a holdem hand
def mainParser(backend, db, cursor, siteID, category, hand, config):
def mainParser(settings, db, cursor, siteID, category, hand, config):
backend = settings['db-backend']
category = fpdb_simple.recogniseCategory(hand[0])
base = "hold" if category == "holdem" or category == "omahahi" or category == "omahahilo" else "stud"
@ -34,6 +35,7 @@ def mainParser(backend, db, cursor, siteID, category, hand, config):
#part 1: read hand no and check for duplicate
siteHandNo = fpdb_simple.parseSiteHandNo(hand[0])
#print "siteHandNo =", siteHandNo
handStartTime = fpdb_simple.parseHandStartTime(hand[0])
isTourney = fpdb_simple.isTourney(hand[0])
@ -126,6 +128,7 @@ def mainParser(backend, db, cursor, siteID, category, hand, config):
totalWinnings = sum(winnings)
# if hold'em, use positions and not antes, if stud do not use positions, use antes
# this is used for handsplayers inserts, so still needed even if hudcache update is being skipped
if base == "hold":
hudImportData = fpdb_simple.generateHudCacheData(playerIDs, base, category, actionTypes
, allIns, actionTypeByNo, winnings, totalWinnings, positions
@ -141,7 +144,7 @@ def mainParser(backend, db, cursor, siteID, category, hand, config):
if base == "hold":
result = fpdb_save_to_db.tourney_holdem_omaha(
config, backend, db, cursor, base, category, siteTourneyNo, buyin
config, settings, db, cursor, base, category, siteTourneyNo, buyin
, fee, knockout, entries, prizepool, tourneyStartTime
, payin_amounts, ranks, tourneyTypeId, siteID, siteHandNo
, gametypeID, handStartTime, names, playerIDs, startCashes
@ -150,7 +153,7 @@ def mainParser(backend, db, cursor, siteID, category, hand, config):
, actionNos, hudImportData, maxSeats, tableName, seatNos)
elif base == "stud":
result = fpdb_save_to_db.tourney_stud(
config, backend, db, cursor, base, category, siteTourneyNo
config, settings, db, cursor, base, category, siteTourneyNo
, buyin, fee, knockout, entries, prizepool, tourneyStartTime
, payin_amounts, ranks, tourneyTypeId, siteID, siteHandNo
, gametypeID, handStartTime, names, playerIDs, startCashes
@ -162,7 +165,7 @@ def mainParser(backend, db, cursor, siteID, category, hand, config):
else:
if base == "hold":
result = fpdb_save_to_db.ring_holdem_omaha(
config, backend, db, cursor, base, category, siteHandNo
config, settings, db, cursor, base, category, siteHandNo
, gametypeID, handStartTime, names, playerIDs
, startCashes, positions, cardValues, cardSuits
, boardValues, boardSuits, winnings, rakes
@ -170,7 +173,7 @@ def mainParser(backend, db, cursor, siteID, category, hand, config):
, hudImportData, maxSeats, tableName, seatNos)
elif base == "stud":
result = fpdb_save_to_db.ring_stud(
config, backend, db, cursor, base, category, siteHandNo, gametypeID
config, settings, db, cursor, base, category, siteHandNo, gametypeID
, handStartTime, names, playerIDs, startCashes, antes
, cardValues, cardSuits, winnings, rakes, actionTypes, allIns
, actionAmounts, actionNos, hudImportData, maxSeats, tableName