home · contact · privacy
Fixed switching to player mode before login if other user logged in.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 31 Oct 2020 09:57:53 +0000 (10:57 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 31 Oct 2020 09:57:53 +0000 (10:57 +0100)
new2/plomrogue/commands.py
new2/plomrogue/io.py

index dc65375417cf46f2e7ea667e9529de1d3e706c4b..97001e0a313f294854eeed5165944418ad1e44e6 100644 (file)
@@ -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)
index 2c048f03b4b1b70fb47356af8cb5ecdc4e1b9c93..908d7bf504b7c304c937729b1bb5cccb3f47538b 100644 (file)
@@ -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)