mirror of
https://github.com/kepler155c/opus
synced 2025-01-12 08:40:26 +00:00
1.12 updates
This commit is contained in:
parent
8db4fed19a
commit
bbcb8ecd6e
@ -31,10 +31,12 @@ local function snmpConnection(socket)
|
|||||||
socket:write('pong')
|
socket:write('pong')
|
||||||
|
|
||||||
elseif msg.type == 'script' then
|
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
|
if fn then
|
||||||
kernel.run({
|
kernel.run({
|
||||||
fn = fn,
|
fn = fn,
|
||||||
|
env = env,
|
||||||
title = 'script',
|
title = 'script',
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user