diff --git a/tools/btconsole.py b/tools/btconsole.py index f09bdcf..711c81a 100644 --- a/tools/btconsole.py +++ b/tools/btconsole.py @@ -547,8 +547,8 @@ class Relay: for host_id, (callsign, mech) in sorted(self.seat_prefs.items()): i = host_id - FIRST_GAME_HOST_ID if 0 <= i < len(pilots): - print(f"[relay] seat {host_id} egg: " - f"vehicle={mech or pilots[i].get('vehicle')} " + print(f"[relay] player {host_id - FIRST_GAME_HOST_ID + 1} " + f"egg: vehicle={mech or pilots[i].get('vehicle')} " f"callsign={callsign or names[i]!r}", flush=True) except Exception as e: print(f"[relay] seat-pref egg rewrite FAILED ({e!r}) -- " @@ -890,7 +890,8 @@ class Relay: f"{host_id} '{tag}' (reserved {SEAT_RESERVE_SECONDS:.0f}s)" f"{pref_note}", flush=True) cs, mech = self.seat_prefs.get(host_id, ("", "")) - print(f"[relay] SEAT {host_id} PRESENT tag='{tag}' " + print(f"[relay] PLAYER {host_id - FIRST_GAME_HOST_ID + 1} SEATED " + f"(host {host_id}) tag='{tag}' " f"callsign='{cs}' mech='{mech}' " f"({len(self.seat_beacons)} seated)", flush=True) return @@ -932,7 +933,8 @@ class Relay: if getattr(c, "ready", False)) i = conn.host_id - FIRST_GAME_HOST_ID tag = self.roster[i] if 0 <= i < len(self.roster) else "?" - print(f"[relay] SEAT {conn.host_id} READY tag='{tag}' " + print(f"[relay] PLAYER {conn.host_id - FIRST_GAME_HOST_ID + 1} " + f"READY (host {conn.host_id}) tag='{tag}' " f"({ready_count}/{len(self.by_host)} loaded)", flush=True) return if route == ROUTE_BCAST: @@ -982,7 +984,8 @@ class Relay: self.seat_prefs.pop(seat, None) i = seat - FIRST_GAME_HOST_ID tag = self.roster[i] if 0 <= i < len(self.roster) else "?" - print(f"[relay] SEAT {seat} FREED tag='{tag}' " + print(f"[relay] PLAYER {seat - FIRST_GAME_HOST_ID + 1} LEFT " + f"(host {seat}) tag='{tag}' " f"({len(self.seat_beacons)} seated)", flush=True) if conn.host_id is not None and self.by_host.get(conn.host_id) is conn: del self.by_host[conn.host_id] diff --git a/tools/btoperator.py b/tools/btoperator.py index 400215d..b4933ab 100644 --- a/tools/btoperator.py +++ b/tools/btoperator.py @@ -64,9 +64,12 @@ class SessionMonitor: RE_RELAY_DOWN = re.compile(r"game\[.* host=(\d+)\] dropped") RE_RELAY_WAITOP = re.compile(r"WAITING FOR OPERATOR") RE_RELAY_SEAT = re.compile( - r"SEAT (\d+) PRESENT tag='([^']*)' callsign='([^']*)' mech='([^']*)'") - RE_RELAY_FREED = re.compile(r"SEAT (\d+) FREED tag='([^']*)'") - RE_RELAY_READY = re.compile(r"SEAT (\d+) READY tag='([^']*)'") + r"PLAYER (\d+) SEATED \(host \d+\) tag='([^']*)' " + r"callsign='([^']*)' mech='([^']*)'") + RE_RELAY_FREED = re.compile( + r"PLAYER (\d+) LEFT \(host \d+\) tag='([^']*)'") + RE_RELAY_READY = re.compile( + r"PLAYER (\d+) READY \(host \d+\) tag='([^']*)'") RE_MESH_EGG = re.compile(r"\[([^\]]+)\] egg sent") RE_MESH_RUN = re.compile(r"\[([^\]]+)\] RunMission #(\d+) sent")