修复创建房间名错误
This commit is contained in:
2
main.lua
2
main.lua
@@ -371,6 +371,8 @@ do
|
|||||||
NOGAME=true
|
NOGAME=true
|
||||||
fs.remove("conf/key")
|
fs.remove("conf/key")
|
||||||
end
|
end
|
||||||
|
USER.username=nil
|
||||||
|
|
||||||
if STAT.version~=VERSION_CODE then
|
if STAT.version~=VERSION_CODE then
|
||||||
newVersionLaunch=true
|
newVersionLaunch=true
|
||||||
STAT.version=VERSION_CODE
|
STAT.version=VERSION_CODE
|
||||||
|
|||||||
@@ -950,7 +950,7 @@ do--function saveRecording()
|
|||||||
os.date("%Y/%m/%d_%A_%H:%M:%S\n")..
|
os.date("%Y/%m/%d_%A_%H:%M:%S\n")..
|
||||||
GAME.curModeName.."\n"..
|
GAME.curModeName.."\n"..
|
||||||
VERSION_NAME.."\n"..
|
VERSION_NAME.."\n"..
|
||||||
(USER.username or"Player")
|
(USER.name or"Player")
|
||||||
local fileBody=
|
local fileBody=
|
||||||
GAME.seed.."\n"..
|
GAME.seed.."\n"..
|
||||||
json.encode(GAME.setting).."\n"..
|
json.encode(GAME.setting).."\n"..
|
||||||
@@ -1051,13 +1051,12 @@ function TICK_httpREQ_getUserInfo(task)
|
|||||||
if response then
|
if response then
|
||||||
local res=json.decode(response.body)
|
local res=json.decode(response.body)
|
||||||
if response.code==200 and res.message=="OK"then
|
if response.code==200 and res.message=="OK"then
|
||||||
-- LOG.print(text.accessSuccessed)
|
USER.name=res.username
|
||||||
USER.username=res.username
|
|
||||||
USER.motto=res.motto
|
USER.motto=res.motto
|
||||||
USER.avatar=res.avatar
|
USER.avatar=res.avatar
|
||||||
FILE.save(USER,"conf/user")
|
FILE.save(USER,"conf/user")
|
||||||
else
|
else
|
||||||
-- LOG.print(text.loginFailed..": "..text.httpCode..response.code.."-"..res.message,"warn")
|
LOG.print("Get user info failed: "..text.httpCode..response.code.."-"..res.message,"warn")
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
elseif request_error then
|
elseif request_error then
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ GAME={--Global game data
|
|||||||
RANKS=FILE.load("conf/unlock")or{sprint_10l=0}--Ranks of modes
|
RANKS=FILE.load("conf/unlock")or{sprint_10l=0}--Ranks of modes
|
||||||
USER=FILE.load("conf/user")or{--User infomation
|
USER=FILE.load("conf/user")or{--User infomation
|
||||||
--Network infos
|
--Network infos
|
||||||
username=false,
|
name=false,
|
||||||
id=false,
|
id=false,
|
||||||
email=false,
|
email=false,
|
||||||
motto=false,
|
motto=false,
|
||||||
|
|||||||
Reference in New Issue
Block a user