From 7fd3c662a5d7e9e307163b6777e2746941cbc481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Mon, 23 May 2016 13:14:42 +0200 Subject: [PATCH] fix issue where people would join a game twice --- game_manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/game_manager.py b/game_manager.py index 69648ba..a3bb30a 100644 --- a/game_manager.py +++ b/game_manager.py @@ -80,6 +80,11 @@ class GameManager(object): except NotEnoughPlayersError: self.end_game(chat, user) + if user.id not in self.userid_players: + self.userid_players[user.id] = list() + + players = self.userid_players[user.id] + player = Player(game, user) players.append(player)