diff --git a/ChaosBot/Services/ProgrammingLanguageInterpreter/LuaProgrammingLanguageInterpreter.cs b/ChaosBot/Services/ProgrammingLanguageInterpreter/LuaProgrammingLanguageInterpreter.cs index 0176800..ee8eb78 100644 --- a/ChaosBot/Services/ProgrammingLanguageInterpreter/LuaProgrammingLanguageInterpreter.cs +++ b/ChaosBot/Services/ProgrammingLanguageInterpreter/LuaProgrammingLanguageInterpreter.cs @@ -27,6 +27,8 @@ namespace ChaosBot.Services.ProgrammingLanguageInterpreter MethodInfo printMethod = GetType().GetMethod("Print", BindingFlags.NonPublic | BindingFlags.Instance); LoggingFacade.Trace($"Overwriting print function with {printMethod}"); _state["print"] = _state.RegisterFunction("print", this, printMethod); + LoggingFacade.Trace("Adding command context to environment"); + _state["context"] = context; LoggingFacade.Trace("Disabling Lua `import` function"); _state.DoString ("\nimport = function () end\n");