From 6ab45d01f9feba475a915e222c693e36deee3ce9 Mon Sep 17 00:00:00 2001 From: Skillet Date: Thu, 16 Feb 2023 19:12:29 -0500 Subject: [PATCH] Update db-log-addOn.js --- squadjsPlugins/db-log-addOn.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/squadjsPlugins/db-log-addOn.js b/squadjsPlugins/db-log-addOn.js index 68bb84c..37392ab 100644 --- a/squadjsPlugins/db-log-addOn.js +++ b/squadjsPlugins/db-log-addOn.js @@ -99,14 +99,14 @@ export default class DBLogPlayerTime extends DBLog { await super.onUpdatedA2SInformation(info); console.log(info); - if((this.seeding == true) && (info.a2sPlayerCount >= 1)){ + if((this.seeding == true) && (info.a2sPlayerCount >= this.options.seedingThreshold)){ console.log('switching to Live'); this.seeding = false; await this.models.PlayerTime.update( { seedTime: new Date() }, { where: { seedTime: null, joinedSeeding: 1, leaveTime: null, server: this.options.overrideServerID || this.server.id } } ); - }else if(this.seeding == false && (info.a2sPlayerCount) < 1){ + }else if(this.seeding == false && (info.a2sPlayerCount-20) < this.options.seedingThreshold){ console.log('switching to seeding'); this.seeding = true; }