Made user ids case insensitive

This commit is contained in:
Cooldude2606 authored and Daniel committed 2024-11-22 04:06:34 -08:00
1 parent 41d76ff757
commit bdf02a5ea2
15 files changed
+130 -45

No files matched your search

+15
View File
@@ -92,4 +92,19 @@ export default class PlayerStats {
}
return json;
}
merge(other: PlayerStats) {
this.joinCount += other.joinCount;
this.onlineTimeMs += other.onlineTimeMs;
if (!this.firstJoinAt || (other.firstJoinAt && other.firstJoinAt > this.firstJoinAt)) {
this.firstJoinAt = other.firstJoinAt;
}
if (!this.lastJoinAt || (other.lastJoinAt && other.lastJoinAt > this.lastJoinAt)) {
this.lastJoinAt = other.lastJoinAt;
}
if (!this.lastLeaveAt || (other.lastLeaveAt && other.lastLeaveAt > this.lastLeaveAt)) {
this.lastLeaveAt = other.lastLeaveAt;
this.lastLeaveReason = other.lastLeaveReason;
}
}
}