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
ff2d3c84ad
commit
8080df93b1
@ -94,9 +94,7 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
);
|
);
|
||||||
let lastServerTime = lastTickTime.time;
|
let lastServerTime = lastTickTime.time;
|
||||||
let playerOnlineID = [];
|
let playerOnlineID = [];
|
||||||
console.log(this);
|
for (player of this.server.players){
|
||||||
let players = await this.server.rcon.getListPlayers();
|
|
||||||
for (player of players){
|
|
||||||
playerOnlineID.push(player.steamID);
|
playerOnlineID.push(player.steamID);
|
||||||
}
|
}
|
||||||
const {not} = Sequelize.Op;
|
const {not} = Sequelize.Op;
|
||||||
@ -122,22 +120,6 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
|
|
||||||
async onUpdatedA2SInformation(info) {
|
async onUpdatedA2SInformation(info) {
|
||||||
await super.onUpdatedA2SInformation(info);
|
await super.onUpdatedA2SInformation(info);
|
||||||
|
|
||||||
if(this.repairSessions == true){
|
|
||||||
let playerOnlineID = [];
|
|
||||||
for (player of this.server){
|
|
||||||
playerOnlineID.push(player.steamID);
|
|
||||||
}
|
|
||||||
const {not} = Sequelize.Op;
|
|
||||||
this.models.PlayerTime.update(
|
|
||||||
{ leaveTime: lastServerTime },
|
|
||||||
{ where: {
|
|
||||||
leaveTime: null,
|
|
||||||
server: this.options.overrideServerID || this.server.id,
|
|
||||||
[not]: [{player: playerOnlineID}]
|
|
||||||
} }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if((this.seeding == true) && (info.a2sPlayerCount >= this.options.seedingThreshold)){
|
if((this.seeding == true) && (info.a2sPlayerCount >= this.options.seedingThreshold)){
|
||||||
console.log('switching to Live');
|
console.log('switching to Live');
|
||||||
|
Loading…
Reference in New Issue
Block a user