def cmd_LOGIN(game, nick, connection_id):
for t in [t for t in game.things if t.type_ == 'player' and t.nickname == nick]:
raise GameError('name already in use')
if connection_id in game.sessions:
t_id = game.sessions[connection_id]
t = game.get_thing(t_id, False)
def cmd_LOGIN(game, nick, connection_id):
for t in [t for t in game.things if t.type_ == 'player' and t.nickname == nick]:
raise GameError('name already in use')
if connection_id in game.sessions:
t_id = game.sessions[connection_id]
t = game.get_thing(t_id, False)