[FEATURE] Adjust more server controllers
This commit is contained in:
parent
62c966a6bd
commit
37e3dc2ae9
16 changed files with 281 additions and 173 deletions
|
@ -1,9 +1,9 @@
|
|||
import { Server as Skio } from "socket.io";
|
||||
import { VERB, WARN, ERR } from "../util/logging.js";
|
||||
import liveLogging from "../k8s/live-logging.js";
|
||||
import rconInterface from "./rcon.js";
|
||||
|
||||
const namespace = process.env.MCL_SERVER_NAMESPACE;
|
||||
import {
|
||||
webConsoleLogs,
|
||||
webConsoleRcon,
|
||||
} from "../controllers/sub-controllers/console-controller.js";
|
||||
|
||||
async function rconSend(socket, m) {
|
||||
if (!socket.rconClient)
|
||||
|
@ -20,8 +20,8 @@ const socketConnect = async (io, socket) => {
|
|||
VERB("WS", "Websocket connecting");
|
||||
socket.mcs = { serverName: socket.handshake.query.serverName };
|
||||
try {
|
||||
await liveLogging(socket, namespace);
|
||||
await rconInterface(socket);
|
||||
await webConsoleLogs(socket);
|
||||
await webConsoleRcon(socket);
|
||||
socket.on("msg", (m) => rconSend(socket, m));
|
||||
} catch (err) {
|
||||
ERR("SOCKETS", err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue