This commit is contained in:
OTCv8
2020-08-15 20:06:04 +02:00
parent 929ab400ed
commit cf931af49e
21 changed files with 87 additions and 1541 deletions

View File

@@ -10,7 +10,7 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, relo
end
if ext[#ext]:lower() == "ui" or ext[#ext]:lower() == "otui" then
table.insert(uiFiles, file)
end
end
end
if #luaFiles == 0 then
@@ -74,6 +74,13 @@ function executeBot(config, storage, tabs, msgCallback, saveConfigCallback, relo
context.tonumber = tonumber
context.type = type
context.pcall = pcall
context.os = {
time = os.time,
date = os.date,
difftime = os.difftime,
date = os.date,
clock = os.clock
}
context.load = function(str) return assert(load(str, nil, nil, context)) end
context.loadstring = context.load
context.assert = assert

View File

@@ -58,6 +58,7 @@ context.BotServer.init = function(name, channel)
end
context.BotServer._wasConnected = false
context.BotServer._websocket = nil
context.BotServer.ping = 0
context.BotServer.init(name, channel)
end
}, context.BotServer.timeout)