Skip to content

Commit

Permalink
Refactor presence bundle handler to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekuruu committed Mar 14, 2024
1 parent 14f12b8 commit 4a78449
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions osu/bancho/packets.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,9 @@ def presence_bundle(stream: StreamIn, game: Game):
user_ids = stream.intlist()

for id in user_ids:
if not (game.bancho.players.by_id(id)):
# Add player if not found
game.bancho.players.add(Player(id, game=game))
game.bancho.players.add(Player(id, game=game))

game.bancho.fast_read = True

game.events.call(ServerPackets.USER_PRESENCE_BUNDLE, user_ids)


Expand Down

0 comments on commit 4a78449

Please sign in to comment.