From c2cd2d5cd656b73aac2c74bb52ecdddeca6cf0ba Mon Sep 17 00:00:00 2001 From: gsemaj Date: Sat, 18 Sep 2021 20:28:57 -0400 Subject: [PATCH] Add functionality to restore default servers --- assets/js/serverselector.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/js/serverselector.js b/assets/js/serverselector.js index f79f328..77e4f4f 100644 --- a/assets/js/serverselector.js +++ b/assets/js/serverselector.js @@ -65,6 +65,11 @@ function deleteServer() { loadServerList(); } +function restoreDefaultServers() { + remotefs.copySync(__dirname+"\\defaults\\servers.json", userdir+"\\servers.json"); + loadServerList(); +} + function loadGameVersions() { var versionjson = JSON.parse(remotefs.readFileSync(userdir+"\\versions.json")); versionarray = versionjson['versions'];