自动登录时机修改为ws-app连接成功并且版本是最新
This commit is contained in:
@@ -259,7 +259,12 @@ function NET.updateWS_app()
|
||||
if res then
|
||||
if res.type=="Connect"then
|
||||
NET.connected=true
|
||||
NET.allow_online=VERSION.code>=res.lowest
|
||||
if VERSION.code>=res.lowest then
|
||||
NET.allow_online=true
|
||||
if USER.authToken then
|
||||
NET.wsconn_user_token(USER.uid,USER.authToken)
|
||||
end
|
||||
end
|
||||
if VERSION.code<res.newestCode then
|
||||
LOG.print(text.oldVersion:gsub("$1",res.newestName),180,COLOR.sky)
|
||||
end
|
||||
|
||||
@@ -181,9 +181,6 @@ local loadingThread=coroutine.wrap(function()
|
||||
TASK.new(NET.updateWS_user)
|
||||
TASK.new(NET.updateWS_play)
|
||||
NET.wsconn_app()
|
||||
if USER.authToken then
|
||||
NET.wsconn_user_token(USER.uid,USER.authToken)
|
||||
end
|
||||
|
||||
while true do
|
||||
if math.random()<.126 then
|
||||
|
||||
Reference in New Issue
Block a user