mirror of
https://github.com/Adorable-Catgirl/LuaComp.git
synced 2024-09-29 07:00:58 +10:00
13 lines
393 B
Lua
13 lines
393 B
Lua
|
local warned = false
|
||
|
function directives.loadmod(env, mod)
|
||
|
if not warned then
|
||
|
io.stderr:write("Warning: loadmod is depreciated and unsafe. The API differs from luapreproc.\n")
|
||
|
warned = true
|
||
|
end
|
||
|
if (not os.execute("stat "..file..">/dev/null")) then
|
||
|
return false, "Module `"..file.."' does not exist!"
|
||
|
end
|
||
|
local modname, func = dofile(mod)
|
||
|
directives[modname] = func
|
||
|
return true
|
||
|
end
|