Update db-log-addOn.js

This commit is contained in:
Skillet 2023-02-15 11:25:24 -05:00 committed by GitHub
parent 37da4689d9
commit 319a9e47c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,8 +110,8 @@ export default class DBLogPlayerTime extends DBLog {
async onPlayerConnected(info) {
if(info.player){
await this.models.SteamUser.upsert({
steamID: info.attacker.steamID,
lastName: info.attacker.name
steamID: info.player.steamID,
lastName: info.player.name
});
await this.models.PlayerTime.create({
server: this.options.overrideServerID || this.server.id,
@ -125,8 +125,8 @@ export default class DBLogPlayerTime extends DBLog {
async onPlayerDisconnected(info) {
if(info.player){
await this.models.SteamUser.upsert({
steamID: info.attacker.steamID,
lastName: info.attacker.name
steamID: info.player.steamID,
lastName: info.player.name
});
await this.models.PlayerTime.update(
{ leaveTime: info.time },