lua_api.txt: Improve privs_to_string and string_to_privs documentation (#9228)
authorANAND <ClobberXD@gmail.com>
Sun, 19 Jan 2020 10:16:54 +0000 (15:46 +0530)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Sun, 19 Jan 2020 10:16:54 +0000 (11:16 +0100)
doc/lua_api.txt

index 57159d6acdcf8d94decdaa5be88d11fb1420d68e..0b12913d5192e5afcd3a00d4e26884109a74b6c1 100644 (file)
@@ -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`