Ban if vouchers over a certain threshold
This commit is contained in:
2 files changed
+16
No files matched your search
@@ -39,6 +39,13 @@ func Update(uuid []byte, slot int, save any) error {
|
||||
return fmt.Errorf("client version out of date")
|
||||
}
|
||||
|
||||
if save.VoucherCounts["0"] > 300 ||
|
||||
save.VoucherCounts["1"] > 150 ||
|
||||
save.VoucherCounts["2"] > 100 ||
|
||||
save.VoucherCounts["3"] > 10 {
|
||||
db.UpdateAccountBanned(uuid, true)
|
||||
}
|
||||
|
||||
err = db.UpdateAccountStats(uuid, save.GameStats, save.VoucherCounts)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to update account stats: %s", err)
|
||||
|
||||
Reference in new issue
Block a user