Skip to content

Commit

Permalink
fix: catch circleguard exception
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueRou committed Feb 13, 2024
1 parent 3577bca commit 2c8df67
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/usecases/anticheat.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,17 @@ async def validate_checksum(unique_ids: str, osu_version: str, client_hash_decod
await _save_suspicion(score, f"mismatching hashes on score submission", detail, alert=False)

async def check_suspicion(player: Player, score: Score):

replay, beatmap = _parse_score(score)
if not beatmap:
return
has_relax = score.mods & Mods.RELAX or score.mods & Mods.AUTOPILOT

frametime = circleguard.frametime(replay)
ur = circleguard.ur(replay, beatmap=beatmap) if not has_relax else 0
snaps = circleguard.snaps(replay, beatmap=beatmap)
try:
frametime = circleguard.frametime(replay)
ur = circleguard.ur(replay, beatmap=beatmap) if not has_relax else 0
snaps = circleguard.snaps(replay, beatmap=beatmap)
except:
log(f"Failed to check the score ({score.id} by {score.player.name}), skipped.", Ansi.RED)

detail = {
'beatmap': {
Expand Down

0 comments on commit 2c8df67

Please sign in to comment.