Ban if daily score over 20000

oauth2
maru 2024-04-28 22:21:30 -04:00
parent e184e9da91
commit b52abbf7fe
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D
1 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,10 @@ func Clear(uuid []byte, slot int, seed string, save defs.SessionSaveData) (Clear
waveCompleted-- waveCompleted--
} }
if save.Score >= 20000 {
db.UpdateAccountBanned(uuid, true)
}
err = db.AddOrUpdateAccountDailyRun(uuid, save.Score, waveCompleted) err = db.AddOrUpdateAccountDailyRun(uuid, save.Score, waveCompleted)
if err != nil { if err != nil {
log.Printf("failed to add or update daily run record: %s", err) log.Printf("failed to add or update daily run record: %s", err)