From d550afacdcb31e6af7168fe14ff1819a7db5ac7a Mon Sep 17 00:00:00 2001 From: Skillet Date: Thu, 16 Feb 2023 01:48:46 -0500 Subject: [PATCH] Update db-log-addOn.js --- squadjsPlugins/db-log-addOn.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/squadjsPlugins/db-log-addOn.js b/squadjsPlugins/db-log-addOn.js index e7f9c18..2609f57 100644 --- a/squadjsPlugins/db-log-addOn.js +++ b/squadjsPlugins/db-log-addOn.js @@ -97,12 +97,16 @@ export default class DBLogPlayerTime extends DBLog { await super.onUpdatedA2SInformation(info); if((this.seeding === true) && (info.a2sPlayerCount >= this.options.seedingThreshold)){ + console.log('switching to Live'); this.seeding = false; await this.models.PlayerTime.update( { seedTime: info.time }, { 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; + }else if(this.seeding === false && (info.a2sPlayerCount-20) < this.options.seedingThreshold){ + console.log('switching to seeding'); + this.seeding = true; + } } async onPlayerConnected(info) {