Fail safely if not in secure.http_mods or trusted_mods

This commit is contained in:
Ceda EI 2019-01-22 19:05:04 +05:30
parent 4dee25a43b
commit 31bd289f32
1 changed files with 5 additions and 1 deletions

View File

@ -14,4 +14,8 @@ function main(http_api)
end
local http_api = minetest.request_http_api()
main(http_api)
if http_api == nil then
minetest.log("error", "Chat Mod is not in secure.http_mods or secure.trusted_mods. Exiting.")
else
main(http_api)
end