mirror of
https://github.com/AsgardEternal/SquadJS.git
synced 2024-09-28 14:04:25 -05:00
Update db-log.js
This commit is contained in:
parent
a4eab2e898
commit
763f2536f8
@ -421,9 +421,7 @@ export default class DBLog extends BasePlugin {
|
||||
name: this.server.serverName
|
||||
});
|
||||
|
||||
this.match = await this.models.Match.findOne({
|
||||
where: { server: this.options.overrideServerID || this.server.id, endTime: null }
|
||||
});
|
||||
this.repairDB();
|
||||
|
||||
this.server.on('TICK_RATE', this.onTickRate);
|
||||
this.server.on('UPDATED_A2S_INFORMATION', this.onUpdatedA2SInformation);
|
||||
@ -434,6 +432,12 @@ export default class DBLog extends BasePlugin {
|
||||
this.server.on('PLAYER_REVIVED', this.onPlayerRevived);
|
||||
}
|
||||
|
||||
async repairDB() {
|
||||
this.match = await this.models.Match.findOne({
|
||||
where: { server: this.options.overrideServerID || this.server.id, endTime: null }
|
||||
});
|
||||
}
|
||||
|
||||
async unmount() {
|
||||
this.server.removeEventListener('TICK_RATE', this.onTickRate);
|
||||
this.server.removeEventListener('UPDATED_A2S_INFORMATION', this.onTickRate);
|
||||
|
Loading…
Reference in New Issue
Block a user