Remove metatable functionality from lua context

This commit is contained in:
Daniel_I_Am 2020-09-27 12:33:06 +02:00
parent 94bbfb18ae
commit 8062e6d980
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84

View File

@ -32,6 +32,9 @@ namespace ChaosBot.Services.ProgrammingLanguageInterpreter
LoggingFacade.Trace("Disabling Lua `import` function"); LoggingFacade.Trace("Disabling Lua `import` function");
_state.DoString ("\nimport = function () end\n"); _state.DoString ("\nimport = function () end\n");
LoggingFacade.Trace("Disabling Lua `metatable` functionality");
_state.DoString ("\ngetmetatable = function () end\n");
_state.DoString ("\nsetmetatable = function () end\n");
LoggingFacade.Trace("Running user Lua code"); LoggingFacade.Trace("Running user Lua code");
_state.DoString(content, command); _state.DoString(content, command);