Updated to OTCv8 3.1 rev 130

This commit is contained in:
OTCv8
2022-02-15 20:58:27 +00:00
parent 26afd88156
commit 5a3e429d32
135 changed files with 5381 additions and 2684 deletions

View File

@@ -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()