async def handle(self, p: Player) -> None: if not p.spectating: log(f"{p} sent can't spectate while not spectating?", Ansi.LRED) return data = packets.spectatorCantSpectate(p.id) host = p.spectating host.enqueue(data) for t in host.spectators: t.enqueue(data)
def cantSpectate(p: Player, pr: PacketReader) -> None: if not p.spectating: printlog(f"{p} sent can't spectate while not spectating?", Ansi.LIGHT_RED) return data = packets.spectatorCantSpectate(p.id) host: Player = p.spectating host.enqueue(data) for t in host.spectators: t.enqueue(data)