assorted fixes

This commit is contained in:
Fabian Dill
2021-07-20 21:19:53 +02:00
parent 10c6a70696
commit bceb8540a1
4 changed files with 16 additions and 10 deletions

View File

@@ -1017,6 +1017,8 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
if clients:
# likely same player with a "ghosted" slot. We bust the ghost.
if "uuid" in args and ctx.client_ids[team, slot] == args["uuid"]:
await ctx.send_msgs(clients[0], [{"cmd": "Print", "text": "You are getting kicked "
"by yourself reconnecting."}])
await clients[0].socket.close() # we have to await the DC of the ghost, so not to create data pasta
client.name = ctx.player_names[(team, slot)]
client.team = team