Skip to content

Commit

Permalink
Fixed game listing
Browse files Browse the repository at this point in the history
  • Loading branch information
reillychase committed Nov 7, 2016
1 parent 5d79554 commit 223ff21
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,13 +666,13 @@ def catch_textedit_chat(self, msg, color):

this_game = []

if re.findall('^(.+) (n?y?) (.+?) (.+) (.)', line):
if re.findall('^(.+?) ([ny]) (.+?) (.+) (.)', line):

game_name = re.findall('(.+) (n?y?) (.+?) (.+) (.)', line)[0][0].strip()
game_is_private = re.findall('(.+) (n?y?) (.+?) (.+) (.)', line)[0][1].strip()
game_type = re.findall('(.+) (n?y?) (.+?) (.+) (.)', line)[0][2].strip()
game_count = re.findall('(.+) (n?y?) (.+?) (.+) (.)', line)[0][3].strip()
game_status = re.findall('(.+) (n?y?) (.+?) (.+) (.)', line)[0][2].strip()
game_name = re.findall('(.+?) ([ny]) (.+?) (.+) (.)', line)[0][0].strip()
game_is_private = re.findall('(.+?) ([ny]) (.+?) (.+) (.)', line)[0][1].strip()
game_type = re.findall('(.+?) ([ny]) (.+?) (.+) (.)', line)[0][3].strip()
game_count = re.findall('(.+?) ([ny]) (.+?) (.+) (.)', line)[0][4].strip()
game_status = re.findall('(.+?) ([ny]) (.+?) (.+) (.)', line)[0][2].strip()

if game_is_private == 'y':
game_name = game_name + ' [Private]'
Expand All @@ -681,6 +681,7 @@ def catch_textedit_chat(self, msg, color):
this_game.append(game_is_private)
this_game.append(game_type)
this_game.append(game_count)
this_game.append(game_status)

self.games.append(this_game)

Expand All @@ -690,7 +691,8 @@ def catch_textedit_chat(self, msg, color):


for game in self.games:
self.list_games.addItem(game[0])
if game[4] == 'open':
self.list_games.addItem(game[0])

self.print_games = 0
return
Expand Down

0 comments on commit 223ff21

Please sign in to comment.