This commit is contained in:
rnd 2018-07-24 12:20:42 +02:00
parent 135fecfe20
commit 0a4ae08a9d

View File

@ -395,13 +395,6 @@ function getSandboxEnv (name)
sqrt = math.sqrt, tan = math.tan, sqrt = math.sqrt, tan = math.tan,
tanh = math.tanh, tanh = math.tanh,
}, },
table = {
concat = table.concat,
insert = table.insert,
maxn = table.maxn,
remove = table.remove,
sort = table.sort,
},
os = { os = {
clock = os.clock, clock = os.clock,
difftime = os.difftime, difftime = os.difftime,
@ -471,6 +464,15 @@ function getSandboxEnv (name)
end end
if authlevel>=1 then -- robot privs if authlevel>=1 then -- robot privs
env.table = {
concat = table.concat,
insert = table.insert,
maxn = table.maxn,
remove = table.remove,
sort = table.sort,
},
env.code.run = function(script) env.code.run = function(script)
if basic_robot.data[name].authlevel < 3 then if basic_robot.data[name].authlevel < 3 then