diff --git a/Zframework/file.lua b/Zframework/file.lua index 1759dcb8..1dd65180 100644 --- a/Zframework/file.lua +++ b/Zframework/file.lua @@ -110,7 +110,7 @@ function FILE.saveSetting() end end -function FILE.loadNetwork() +function FILE.loadAccount() local F=files.setting if F:open("r")then local s=F:read() @@ -121,14 +121,14 @@ function FILE.loadNetwork() F:close() if s then setfenv(s,{}) - addToTable(s(),NETWORK) + addToTable(s(),ACCOUNT) end end end -function FILE.saveNetwork() +function FILE.saveAccount() local F=files.setting F:open("w") - F:write(dumpTable(NETWORK)) + F:write(dumpTable(ACCOUNT)) F:flush()F:close() end diff --git a/parts/globalTables.lua b/parts/globalTables.lua index 53da90bd..87a79541 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -299,7 +299,7 @@ for i=1,25 do STAT.spin[i]={0,0,0,0,0,0,0} end -NETWORK={ +ACCOUNT={ id=nil, username=nil, motto=nil, diff --git a/parts/tick.lua b/parts/tick.lua index fe043971..eb90d385 100644 --- a/parts/tick.lua +++ b/parts/tick.lua @@ -156,10 +156,10 @@ function Tick.httpREQ_login(data) local success,content=json.decode(response.body) if success then LOG.print(text.loginSuccessed..": "..content.message) - NETWORK.id=content.id - NETWORK.username=content.username - NETWORK.auth_token=content.auth_token - FILE.saveNetwork() + ACCOUNT.id=content.id + ACCOUNT.username=content.username + ACCOUNT.auth_token=content.auth_token + FILE.saveAccount() else LOG.print(text.jsonError,"warn") end