From: Christian Heller Date: Sat, 31 Oct 2020 09:57:53 +0000 (+0100) Subject: Fixed switching to player mode before login if other user logged in. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/foo.html?a=commitdiff_plain;h=1d9e41e7df05336a6688382c9374c547979cf11e;p=plomrogue2-experiments Fixed switching to player mode before login if other user logged in. --- diff --git a/new2/plomrogue/commands.py b/new2/plomrogue/commands.py index dc65375..97001e0 100644 --- a/new2/plomrogue/commands.py +++ b/new2/plomrogue/commands.py @@ -26,7 +26,7 @@ def cmd_LOGIN(game, nick, connection_id): t.position = YX(game.map.size.y // 2, game.map.size.x // 2) game.things += [t] # TODO refactor into Thing.__init__? game.sessions[connection_id] = t.id_ - game.io.send('LOGIN_OK') + game.io.send('LOGIN_OK', connection_id) t.nickname = nick game.io.send('CHAT ' + quote(t.nickname + ' entered the map.')) game.io.send('PLAYER_ID %s' % t.id_, connection_id) diff --git a/new2/plomrogue/io.py b/new2/plomrogue/io.py index 2c048f0..908d7bf 100644 --- a/new2/plomrogue/io.py +++ b/new2/plomrogue/io.py @@ -56,7 +56,6 @@ class GameIO(): from plomrogue.errors import GameError, ArgError, PlayError from plomrogue.misc import quote - print('DEBUG', input_); def answer(connection_id, msg): if connection_id: self.send(msg, connection_id)