diff --git a/osu/bancho/packets.py b/osu/bancho/packets.py index 9d67fe0..a47851c 100644 --- a/osu/bancho/packets.py +++ b/osu/bancho/packets.py @@ -6,7 +6,7 @@ from ..objects.channel import Channel from ..objects.player import Player from ..objects.match import Match - + if TYPE_CHECKING: from ..game import Game @@ -568,6 +568,7 @@ def dms_blocked(stream: StreamIn, game: "Game"): @Packets.register(ServerPackets.NEW_MATCH) def new_match(stream: StreamIn, game: "Game"): match = Match.decode(stream, game, game.bancho.max_slots) + game.bancho.matches.add(match) game.events.call(ServerPackets.NEW_MATCH, match) diff --git a/osu/objects/collections.py b/osu/objects/collections.py index f79b352..b93ea0b 100644 --- a/osu/objects/collections.py +++ b/osu/objects/collections.py @@ -14,6 +14,9 @@ if TYPE_CHECKING: from ..game import Game +if TYPE_CHECKING: + from ..game import Game + class Players(LockedSet[Player]): def __init__(self, game: "Game") -> None: