1
0
mirror of https://github.com/kepler155c/opus synced 2024-12-24 23:50:26 +00:00

1.12 updates

This commit is contained in:
kepler155c@gmail.com 2018-04-01 18:40:08 -04:00
parent 8db4fed19a
commit bbcb8ecd6e

View File

@ -31,10 +31,12 @@ local function snmpConnection(socket)
socket:write('pong')
elseif msg.type == 'script' then
local fn, err = loadstring(msg.args, 'script')
local env = setmetatable(Util.shallowCopy(_ENV), { __index = _G })
local fn, err = load(msg.args, 'script', nil, env)
if fn then
kernel.run({
fn = fn,
env = env,
title = 'script',
})
else