From: Christian Heller Date: Sun, 20 Dec 2020 15:32:12 +0000 (+0100) Subject: Add (temporary?) debug info on joins/parts/session numbers. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/%7B%7Bdb.prefix%7D%7D/day?a=commitdiff_plain;h=64cf00e418112f70163a5b24ccad8247a88abfd9;p=plomrogue2 Add (temporary?) debug info on joins/parts/session numbers. --- diff --git a/plomrogue/commands.py b/plomrogue/commands.py index a7b704e..9f7bfff 100644 --- a/plomrogue/commands.py +++ b/plomrogue/commands.py @@ -128,6 +128,7 @@ def cmd_NICK(game, nick, connection_id): raise GameError('can only rename when already logged in') old_nick = t.name t.name = nick + print('DEBUG RENAME %s %s' % (old_nick, nick)) game.io.send('CHAT ' + quote(old_nick + ' renamed themselves to ' + nick)) game.changed = True game.record_change(t.position, 'other') diff --git a/plomrogue/game.py b/plomrogue/game.py index 415c3e8..90f70d9 100755 --- a/plomrogue/game.py +++ b/plomrogue/game.py @@ -346,6 +346,7 @@ class Game(GameBase): 'thing_id': t.id_, 'status': 'player' } + print('DEBUG LOGIN', t.name, len(self.sessions)) self.io.send('PLAYER_ID %s' % t.id_, connection_id) self.io.send('LOGIN_OK', connection_id) self.io.send('CHAT ' + quote(t.name + ' entered the map.')) @@ -373,6 +374,7 @@ class Game(GameBase): spawn_point = self.add_thing('SpawnPoint', t.position) spawn_point.temporary = True spawn_point.name = t.name + print('DEBUG LEFT MAP', t.name) self.remove_thing(t) to_delete += [connection_id] for connection_id in to_delete: