- Added basic updater
- Handle asset download error
This commit is contained in:
Felix
2016-08-17 15:56:16 +02:00
parent eba199a240
commit 88d4b85860
11 changed files with 161 additions and 18 deletions

View File

@@ -203,4 +203,4 @@ export function getUserQueryData(obj) {
obj.email
]);
}
}

View File

@@ -87,8 +87,14 @@ class GameServer {
password: CFG.SERVER_POGO_CLIENT_PASSWORD,
downloadModels: false
}).then((asset) => {
this.print("Created asset download session");
resolve(asset);
if (asset && asset.digest && asset.digest.length) {
this.print("Created asset download session");
resolve(asset);
}
else {
this.print("Failed to download asset digest!", 31);
return void 0;
}
});
});

View File

@@ -2,6 +2,8 @@ import fs from "fs";
import * as CFG from "../cfg";
import updater from "../updater";
const helpMessage = fs.readFileSync(".help", "utf8");
export function processCommand(cmd, data) {
@@ -38,6 +40,11 @@ export function processCommand(cmd, data) {
var length = this.clients.length;
this.print(`Saved ${length} player${length === 1 ? "": "s"} into database!`);
break;
case "/update":
updater().then(() => {
// bla
});
break;
default:
this.print(`${cmd} is not a valid command!`, 31);
break;