aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorANAND <ClobberXD@gmail.com>2020-01-19 15:46:54 +0530
committerSmallJoker <SmallJoker@users.noreply.github.com>2020-01-19 11:16:54 +0100
commit468eb4bf5710e851b2599baeff870518f979c71a (patch)
treea00fd2e32b68b8e0eac4c0db3ed1d6af7c580d9d /doc
parente8fd1ce62331146fae0e98ce4a94d3720f308abf (diff)
downloadminetest-468eb4bf5710e851b2599baeff870518f979c71a.tar.gz
minetest-468eb4bf5710e851b2599baeff870518f979c71a.tar.bz2
minetest-468eb4bf5710e851b2599baeff870518f979c71a.zip
lua_api.txt: Improve privs_to_string and string_to_privs documentation (#9228)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 57159d6ac..0b12913d5 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -4336,9 +4336,13 @@ Setting-related
Authentication
--------------
-* `minetest.string_to_privs(str)`: returns `{priv1=true,...}`
-* `minetest.privs_to_string(privs)`: returns `"priv1,priv2,..."`
- * Convert between two privilege representations
+* `minetest.string_to_privs(str[, delim])`:
+ * Converts string representation of privs into table form
+ * `delim`: String separating the privs. Defaults to `","`.
+ * Returns `{ priv1 = true, ... }`
+* `minetest.privs_to_string(privs[, delim])`:
+ * Returns the string representation of `privs`
+ * `delim`: String to delimit privs. Defaults to `","`.
* `minetest.get_player_privs(name) -> {priv1=true,...}`
* `minetest.check_player_privs(player_or_name, ...)`:
returns `bool, missing_privs`