Record all players as leaving on server exit

In the case of shutdown the Factorio server will not notify the
currently online players as leaving the game.  Notify the master server
that all remaining online players quit the game in this case.
This commit is contained in:
Hornwitser committed 2022-07-12 23:03:50 +02:00
1 parent ac62f66aa1
commit deb6842a4d
2 files changed
+7 -2

No files matched your search

+3
View File
@@ -483,6 +483,9 @@ class Instance extends libLink.Link {
pluginInstance.onExit();
}
for (let player of left) {
this._recordPlayerLeave(player, "server_quit");
}
this._saveStats().catch(err => this.logger.error(`Error saving stats:\n${err.stack}`));
}