From 31abc7f25c7254fc13de1eacbeb916663454a470 Mon Sep 17 00:00:00 2001 From: suwings Date: Mon, 23 Apr 2018 11:22:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20-=20=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- route/websocket/console.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/route/websocket/console.js b/route/websocket/console.js index a84c424..dbd9eb0 100644 --- a/route/websocket/console.js +++ b/route/websocket/console.js @@ -18,7 +18,6 @@ const EventObserver = new EventEmitter(); MCSERVER.consoleLog = {}; //控制台信息广播 -//使用万年蠢逼 Mg 设计方案 function selectWebsocket(serverName, callback) { let all = MCSERVER.allSockets; for (let k in all) { @@ -67,7 +66,6 @@ WebSocketObserver().listener('server/console/ws', (data) => { let userName = data.WsSession.username; let serverName = data.body.trim(); - // console.log('[' + serverName + '] >>> 用户 ' + userName + ' 请求控制台监听'); //可以将 user 实例化存在Session中,以便于只读的使用。。。。 if (permssion.isCanServer(userName, serverName)) { var serverT = serverModel.ServerManager().getServer(serverName); @@ -121,7 +119,7 @@ serverModel.ServerManager().on('console', (data) => { let server = serverModel.ServerManager().getServer(data.serverName); let consoleData = data.msg.replace(/\n/gim, '
'); - //将输出载入历史记录 这里曾出现过 server 未定义bug,情况不明,已加保险 + //将输出载入历史记录 if (server) server.terminalLog(consoleData); if (!consoleBuffer[data.serverName]) consoleBuffer[data.serverName] = "";