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