forked from test/mau_mau_bot
kind-of bugfix for duplicate players
This commit is contained in:
parent
5c87e74ae2
commit
8dcd05dbb2
1 changed files with 13 additions and 3 deletions
|
@ -144,10 +144,20 @@ class GameManager(object):
|
|||
pass
|
||||
|
||||
if this_users_players:
|
||||
self.userid_current[player_in_game.user.id] = this_users_players[0]
|
||||
try:
|
||||
self.userid_current[player_in_game.user.id] = this_users_players[0]
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
del self.userid_players[player_in_game.user.id]
|
||||
del self.userid_current[player_in_game.user.id]
|
||||
try:
|
||||
del self.userid_players[player_in_game.user.id]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
del self.userid_current[player_in_game.user.id]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
self.chatid_games[chat.id].remove(game)
|
||||
if not self.chatid_games[chat.id]:
|
||||
|
|
Loading…
Reference in a new issue