mirror of
https://github.com/AsgardEternal/SquadJSDocker.git
synced 2025-01-02 12:09:20 -06:00
Update db-log-addOn.js
This commit is contained in:
parent
1cf304388b
commit
b221f96d49
@ -95,16 +95,14 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
|
|
||||||
async onUpdatedA2SInformation(info) {
|
async onUpdatedA2SInformation(info) {
|
||||||
await super.onUpdatedA2SInformation(info);
|
await super.onUpdatedA2SInformation(info);
|
||||||
|
|
||||||
if(info.a2sPlayerCount >= this.options.seedingThreshold && this.seeding === true) {
|
if((this.seeding === true) && (info.a2sPlayerCount >= this.options.seedingThreshold)){
|
||||||
await this.models.PlayerTime.update(
|
this.seeding = false;
|
||||||
|
await this.models.PlayerTime.update(
|
||||||
{ seedTime: info.time },
|
{ seedTime: info.time },
|
||||||
{ where: { seedTime: null, joinedSeeding: 1, leaveTime: null, server: this.options.overrideServerID || this.server.id } }
|
{ where: { seedTime: null, joinedSeeding: 1, leaveTime: null, server: this.options.overrideServerID || this.server.id } }
|
||||||
);
|
);
|
||||||
}
|
}else if(this.seeding === false && (info.a2sPlayerCount-20) < this.options.seedingThreshold) this.seeding = true;
|
||||||
|
|
||||||
if(this.seeding === true && info.a2sPlayerCount >= this.options.seedingThreshold) this.seeding = false;
|
|
||||||
else if(this.seeding === false && (info.a2sPlayerCount-20) < this.options.seedingThreshold) this.seeding = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async onPlayerConnected(info) {
|
async onPlayerConnected(info) {
|
||||||
|
Loading…
Reference in New Issue
Block a user