예제 #1
0
파일: cho.py 프로젝트: Mxnuuel/gulag
    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)
예제 #2
0
파일: bancho.py 프로젝트: kingdom5500/gulag
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)