ide-helper: improve doc-blocks for some privs functions.

This commit is contained in:
alek13
2025-02-09 13:59:53 +03:00
parent 5098bbdb4f
commit 971d3629d4

View File

@@ -723,14 +723,22 @@ function minetest.setting_get_pos(name) end
--- * Returns `{ priv1 = true, ... }` --- * Returns `{ priv1 = true, ... }`
--- ---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4774-L4777) --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4774-L4777)
--- @param str string
--- @param delim string
--- @return table<string,boolean>
function minetest.string_to_privs(str, delim) end function minetest.string_to_privs(str, delim) end
--- * Returns the string representation of `privs` --- * Returns the string representation of `privs`
--- * `delim`: [Optional] String to delimit privs. Defaults to `","`. --- * `delim`: [Optional] String to delimit privs. Defaults to `","`.
--- ---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4778-L4780) --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4778-L4780)
--- @param privs table<string,boolean>
--- @param delim string
--- @return string
function minetest.privs_to_string(privs, delim) end function minetest.privs_to_string(privs, delim) end
--- Returns -> {priv1=true,...} --- Returns -> {priv1=true,...}
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4781-L4781) --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4781-L4781)
--- @param name string
--- @return table<string,boolean>
function minetest.get_player_privs(name) end function minetest.get_player_privs(name) end
--- Returns `bool, missing_privs` --- Returns `bool, missing_privs`
--- * A quickhand for checking privileges. --- * A quickhand for checking privileges.
@@ -739,6 +747,8 @@ function minetest.get_player_privs(name) end
--- a table, e.g. `{ priva = true, privb = true }`. --- a table, e.g. `{ priva = true, privb = true }`.
--- ---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4782-L4787) --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4782-L4787)
--- @param player_or_name Player|string
--- @return boolean,table
function minetest.check_player_privs(player_or_name, ...) end function minetest.check_player_privs(player_or_name, ...) end
--- * Returns true if the "password entry" for a player with name matches given --- * Returns true if the "password entry" for a player with name matches given
--- password, false otherwise. --- password, false otherwise.
@@ -787,7 +797,7 @@ function minetest.set_player_password(name, password_hash) end
--- ---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4816-L4817) --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4816-L4817)
--- @param name string --- @param name string
--- @param privs table object like `{priv1=true,...}` --- @param privs table<string,boolean> object like `{priv1=true,...}`
function minetest.set_player_privs(name, privs) end function minetest.set_player_privs(name, privs) end
--- * See `reload()` in authentication handler definition --- * See `reload()` in authentication handler definition
--- ---