mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-11-01 11:26:23 +01:00
Updated to OTCv8 3.1 rev 130
This commit is contained in:
@@ -190,7 +190,13 @@ function refresh()
|
||||
|
||||
-- storage
|
||||
botStorage = {}
|
||||
botStorageFile = "/bot/" .. configName .. "/storage.json"
|
||||
|
||||
local path = "/bot/" .. configName .. "/storage/"
|
||||
if not g_resources.directoryExists(path) then
|
||||
g_resources.makeDir(path)
|
||||
end
|
||||
|
||||
botStorageFile = path.."profile_" .. g_settings.getNumber('profile') .. ".json"
|
||||
if g_resources.fileExists(botStorageFile) then
|
||||
local status, result = pcall(function()
|
||||
return json.decode(g_resources.readFileContents(botStorageFile))
|
||||
@@ -255,7 +261,9 @@ end
|
||||
|
||||
function online()
|
||||
botButton:show()
|
||||
scheduleEvent(refresh, 20)
|
||||
if not modules.client_profiles.ChangedProfile then
|
||||
scheduleEvent(refresh, 20)
|
||||
end
|
||||
end
|
||||
|
||||
function offline()
|
||||
|
||||
Reference in New Issue
Block a user