From 04f67d4052ac818fabfb8256a8481bf64964f195 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 18 Aug 2021 03:33:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=8F=8C=E8=AF=AD=E5=85=AC?= =?UTF-8?q?=E5=91=8A=E6=A0=B9=E6=8D=AE=E8=AE=BE=E7=BD=AE=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=80=A7=E6=98=BE=E7=A4=BA=20close=20#78?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/net.lua | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/parts/net.lua b/parts/net.lua index 1ae639c7..2d5a832d 100644 --- a/parts/net.lua +++ b/parts/net.lua @@ -75,6 +75,12 @@ local function _parse(res) end end +--Parse notice +local function _parseNotice(str) + str=STRING.split(str,"///") + return str[SETTING.lang<=3 and 1 or 2]or str[1] +end + --WS close message local function _closeMessage(message) local mes=JSON.decode(message) @@ -86,7 +92,7 @@ local function _closeMessage(message) end --Remove player when leave -local function removePlayer(L,sid) +local function _removePlayer(L,sid) for i=1,#L do if L[i].sid==sid then rem(L,i) @@ -96,7 +102,7 @@ local function removePlayer(L,sid) end --Push stream data to players -local function pumpStream(d) +local function _pumpStream(d) if d.uid~=USER.uid then for _,P in next,PLAYERS do if P.uid==d.uid then @@ -399,7 +405,7 @@ function NET.updateWS_app() if VERSION.code