Update BdsManegerServer.js #246
@ -290,7 +290,8 @@ module.exports.StartServer = function start() {
|
||||
});
|
||||
|
||||
// Socket.io
|
||||
io.on("ServerCommand", (data = "") => {
|
||||
io.on("connection", socket => {
|
||||
socket.on("ServerCommand", (data, callback) => {
|
||||
if (typeof data === "string") return returnFuntion.command(data);
|
||||
else if (typeof data === "object") {
|
||||
if (typeof data.uuid === "string") {
|
||||
@ -299,6 +300,7 @@ module.exports.StartServer = function start() {
|
||||
}
|
||||
return;
|
||||
});
|
||||
});
|
||||
ServerExec.on("exit", code => io.emit("ServerExit", {
|
||||
UUID: returnFuntion.uuid,
|
||||
exitCode: code
|
||||
@ -438,4 +440,4 @@ module.exports.CronBackups = BdsSettings.GetCronBackup().map(Crron => {
|
||||
else console.info("Oracle Bucket Backup Disabled");
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user