From 2ae23e2cfd6b40fea1dc7993df8be56b671cda53 Mon Sep 17 00:00:00 2001 From: Skillet Date: Sat, 18 Feb 2023 15:59:13 -0500 Subject: [PATCH] Update db-log-addOn.js --- squadjsPlugins/db-log-addOn.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/squadjsPlugins/db-log-addOn.js b/squadjsPlugins/db-log-addOn.js index 5b119c1..6004198 100644 --- a/squadjsPlugins/db-log-addOn.js +++ b/squadjsPlugins/db-log-addOn.js @@ -118,14 +118,13 @@ export default class DBLogPlayerTime extends DBLog { await this.models.SteamUser.upsert({ steamID: info.player.steamID, lastName: info.player.name - }); + });} await this.models.PlayerTime.create({ server: this.options.overrideServerID || this.server.id, - player: info.player.steamID, + player: info.steamID, joinTime: info.time, joinedSeeding: this.seeding }); - } } async onPlayerDisconnected(info) { @@ -134,11 +133,10 @@ export default class DBLogPlayerTime extends DBLog { await this.models.SteamUser.upsert({ steamID: info.player.steamID, lastName: info.player.name - }); + });} await this.models.PlayerTime.update( { leaveTime: info.time }, - { where: { player: info.player.steamID, leaveTime: null, server: this.options.overrideServerID || this.server.id } } + { where: { player: info.steamID, leaveTime: null, server: this.options.overrideServerID || this.server.id } } ); - } } }