aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-09-09 21:52:07 -0400
committerShadowNinja <shadowninja@minetest.net>2015-05-16 18:33:19 -0400
commit6c06330daf04ed1c390131755b64338ca7d79a7e (patch)
tree3df6d4d85beb3da343d2ac44cabd15c6ac8e6e06 /doc
parent05ab9973f9029676dfa252617c8cb698ab13eb24 (diff)
downloadminetest-6c06330daf04ed1c390131755b64338ca7d79a7e.tar.gz
minetest-6c06330daf04ed1c390131755b64338ca7d79a7e.tar.bz2
minetest-6c06330daf04ed1c390131755b64338ca7d79a7e.zip
Add core.request_insecure_environment()
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index c82208286..0e1dc487f 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2290,13 +2290,20 @@ These functions return the leftover itemstack.
* `minetest.forceload_block(pos)`
* forceloads the position `pos`.
* returns `true` if area could be forceloaded
+ * Please note that forceloaded areas are saved when the server restarts.
* `minetest.forceload_free_block(pos)`
* stops forceloading the position `pos`
-Please note that forceloaded areas are saved when the server restarts.
-minetest.global_exists(name)
-^ Checks if a global variable has been set, without triggering a warning.
+* `minetest.request_insecure_environment()`: returns an environment containing
+ insecure functions if the calling mod has been listed as trusted in the
+ `secure.trusted_mods` setting or security is disabled, otherwise returns `nil`.
+ * Only works at init time.
+ * **DO NOT ALLOW ANY OTHER MODS TO ACCESS THE RETURNED ENVIRONMENT, STORE IT IN
+ A LOCAL VARIABLE!**
+
+* `minetest.global_exists(name)`
+ * Checks if a global variable has been set, without triggering a warning.
### Global objects
* `minetest.env`: `EnvRef` of the server environment and world.