From af710acf9e8219a421ac67520296d889179940d8 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 28 Mar 2021 02:00:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=80=BB=E8=BE=91=E5=81=9A?= =?UTF-8?q?=E5=A5=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/gametoolfunc.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 4135920a..faa0ce0e 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -1163,15 +1163,17 @@ do return else local res=JSON.decode(message) - if res.messages=="Connected"then + if res.message=="Connected"then LOGIN=true - USER.authToken=res.authToken - USER.id=res.id + if res.id then + USER.id=res.id + USER.authToken=res.authToken + SCN.go("net_menu") + end FILE.save(USER,"conf/user","q") LOG.print(text.loginSuccessed) - WS.send("user",JSON.encode{ - action=0, - }) + + --Get self infos WS.send("user",JSON.encode{ action=1, data={ @@ -1180,7 +1182,7 @@ do }) elseif res.action==0 then USER.accessToken=res.accessToken - FILE.save(USER,"conf/user") + LOG.print(text.accessSuccessed) elseif res.action==1 then USER.name=res.username USER.motto=res.motto