Skip to content

Commit

Permalink
Fixed games info lists
Browse files Browse the repository at this point in the history
  • Loading branch information
reillychase committed Oct 27, 2016
1 parent 676b073 commit ef17a2f
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,35 +535,37 @@ def catch_textedit_chat(self, msg, color):

msg_2 = msg.splitlines()

this_game = []


for line in msg_2:

this_game = []

if re.findall('^\s(.+?)\s.\s', line):
if re.findall('^(.+) (n?y?) open (.+) (.)', line):

if 'open' in line:
game_name = re.findall('(.+) (n?y?) open (.+) (.)', line)[0][0].strip()
game_is_private = re.findall('(.+) (n?y?) open (.+) (.)', line)[0][1].strip()
game_type = re.findall('(.+) (n?y?) open (.+) (.)', line)[0][2].strip()
game_count = re.findall('(.+) (n?y?) open (.+) (.)', line)[0][3].strip()
game_name = re.findall('(.+) (n?y?) open (.+) (.)', line)[0][0].strip()
game_is_private = re.findall('(.+) (n?y?) open (.+) (.)', line)[0][1].strip()
game_type = re.findall('(.+) (n?y?) open (.+) (.)', line)[0][2].strip()
game_count = re.findall('(.+) (n?y?) open (.+) (.)', line)[0][3].strip()

if game_is_private == 'y':
game_name = game_name + ' [Private]'
if game_is_private == 'y':
game_name = game_name + ' [Private]'

this_game.append(game_name)
this_game.append(game_is_private)
this_game.append(game_type)
this_game.append(game_count)
this_game.append(game_name)
this_game.append(game_is_private)
this_game.append(game_type)
this_game.append(game_count)

self.games.append(this_game)
self.games.append(this_game)

if self.print_games == 1:
line = '<span style="color: #ffff00;">' + line + '</span>'
self.textedit_chat.append(str(line).decode('string_escape'))

if self.print_games == 1:
line = '<span style="color: #ffff00;">' + line + '</span>'
self.textedit_chat.append(str(line).decode('string_escape'))

for game in self.games:
self.list_games.addItem(game[0])

self.print_games = 0
return

Expand Down

0 comments on commit ef17a2f

Please sign in to comment.