class MatchSkipRequest(BanchoPacket, type=Packets.OSU_MATCH_SKIP_REQUEST): async def handle(self, p: Player) -> None: if not (m := p.match): return m.get_slot(p).skipped = True m.enqueue(packets.matchPlayerSkipped(p.id)) for s in m.slots: if s.status == SlotStatus.playing and not s.skipped: return # all users have skipped, enqueue a skip. m.enqueue(packets.matchSkip(), lobby=False)
if not (m := p.match): return m.get_slot(p).status = SlotStatus.not_ready m.enqueue(packets.updateMatch(m)) # PacketID: 60 @bancho_packet(Packet.c_matchSkipRequest) def matchSkipRequest(p: Player, pr: PacketReader) -> None: if not (m := p.match): printlog(f'{p} tried unreadying outside of a match? (1)') return m.get_slot(p).skipped = True m.enqueue(packets.matchPlayerSkipped(p.id)) for s in m.slots: if s.status & SlotStatus.playing and not s.skipped: return # All users have skipped, enqueue a skip. m.enqueue(packets.matchSkip(), lobby=False) # PacketID: 63 @bancho_packet(Packet.c_channelJoin) def channelJoin(p: Player, pr: PacketReader) -> None: chan_name = pr.read(osuTypes.string)[0] c = glob.channels.get(chan_name)