From 16d53f1502171647a1eb5625a49d0cd2e30b955b Mon Sep 17 00:00:00 2001 From: PassThePeas Date: Sat, 12 Sep 2009 23:14:55 +0200 Subject: [PATCH] Patch for HUD and FTP tourneys modified: Hand.py - writeTableLine : adds the tourneyNo in tourney context modified: Tables.py - discover_nt_by_name : add filter for HUD and chat windows --- pyfpdb/Hand.py | 6 +++++- pyfpdb/Tables.py | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 7a95f78a..31b9ec89 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -596,7 +596,11 @@ Map the tuple self.gametype onto the pokerstars string describing it def writeTableLine(self): - table_string = "Table \'%s\' %s-max" % (self.tablename, self.maxseats) + table_string = "Table " + if self.gametype['type'] == 'tour': + table_string = table_string + "\'%s %s\' %s-max" % (self.tourNo, self.tablename, self.maxseats) + else: + table_string = table_string + "\'%s\' %s-max" % (self.tablename, self.maxseats) if self.gametype['currency'] == 'play': table_string = table_string + " (Play Money)" if self.buttonpos != None and self.buttonpos != 0: diff --git a/pyfpdb/Tables.py b/pyfpdb/Tables.py index 082bc171..09510536 100755 --- a/pyfpdb/Tables.py +++ b/pyfpdb/Tables.py @@ -253,6 +253,10 @@ def discover_nt_tournament(c, tour_number, tab_number): titles ={} win32gui.EnumWindows(win_enum_handler, titles) for hwnd in titles: + if 'Chat:' in titles[hwnd]: continue # Some sites (FTP? PS? Others?) have seperable or seperately constructed chat windows + if 'History for table:' in titles[hwnd]: continue # Everleaf Network HH viewer window + if 'HUD:' in titles[hwnd]: continue # FPDB HUD window + if re.search(search_string, titles[hwnd]): return decode_windows(c, titles[hwnd], hwnd) return None