Update db-log-addOn.js

This commit is contained in:
Skillet 2023-05-08 17:02:33 -04:00 committed by GitHub
parent 65335e0bca
commit e9f824eb95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,11 +285,12 @@ export default class DBLogPlayerTime extends DBLog {
return; return;
} }
const adminfile = await open(lcladminpath, 'rw'); const adminfile = await open(lcladminpath, 'r+');
await adminfile.write(`Group=server-${this.server.options.id}-autowl:reserve\n`); await adminfile.write(`Group=server-${this.server.options.id}-autowl:reserve\n`);
for(const seeding of seedid){ for(const seeding of seedid){
await adminfile.write(`Admin=${seeding.steamID}:server-${this.server.options.id}-autowl //name:${seeding.playername}, discord ID: ${seeding.discordID}\n`); await adminfile.write(`Admin=${seeding.steamID}:server-${this.server.options.id}-autowl //name:${seeding.playername}, discord ID: ${seeding.discordID}\n`);
} }
await adminfile.close();
} }
async onNewGame(info) { async onNewGame(info) {