mirror of
https://github.com/smogon/pokemon-showdown-loginserver.git
synced 2026-04-25 08:04:15 -05:00
Suspects: Ensure no games were played before suspect start
This commit is contained in:
parent
1486ae18a9
commit
ccea2dbe94
|
|
@ -382,11 +382,14 @@ export const actions: {[k: string]: QueryHandler} = {
|
|||
}
|
||||
}
|
||||
const regtime = (await tables.users.get(rating.userid))?.registertime;
|
||||
const ratingData = await ladder.getRating(rating.userid);
|
||||
if (
|
||||
// sanity check for reqs existing just to be totally safe
|
||||
(reqsMet >= 1 && reqsMet === reqCount) &&
|
||||
// regged after the test began
|
||||
(regtime && regtime > suspects[formatid].startDate)
|
||||
(regtime && regtime > suspects[formatid].startDate) &&
|
||||
// did not play games before the test began
|
||||
(ratingData?.first_played && ratingData.first_played > suspects[formatid].startDate)
|
||||
) {
|
||||
const data = JSON.stringify({
|
||||
userid: rating.userid,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user