aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-12-06 17:32:49 +0100
committerSmallJoker <SmallJoker@users.noreply.github.com>2017-12-06 17:32:49 +0100
commit4edf08709010f721b099dfae3cab011acbdfb3ff (patch)
tree530b903ee81b672fe5a4dd9cfa7a00059b5c541a /doc
parent2b5341c51864660bb1a434a520f7cca9ce3619e6 (diff)
downloadminetest-4edf08709010f721b099dfae3cab011acbdfb3ff.tar.gz
minetest-4edf08709010f721b099dfae3cab011acbdfb3ff.tar.bz2
minetest-4edf08709010f721b099dfae3cab011acbdfb3ff.zip
Auth handler: Player deletion & Iterator (#6741)
* Add player deletion method to auth handler (fixes #6653) * Support iterating over the auth database There was no way to do this previously and a recent commit broke doing this the "hacky" way by accessing `core.auth_table`.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 24e928d85..1e6cf0b71 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -3124,8 +3124,11 @@ These functions return the leftover itemstack.
* `minetest.get_server_status()`: returns server status string
* `minetest.get_server_uptime()`: returns the server uptime in seconds
* `minetest.remove_player(name)`: remove player from database (if he is not connected).
- * Does not remove player authentication data, minetest.player_exists will continue to return true.
+ * As auth data is not removed, minetest.player_exists will continue to return true.
+ Call the below method as well if you want to remove auth data too.
* Returns a code (0: successful, 1: no such player, 2: player is connected)
+* `minetest.remove_player_auth(name)`: remove player authentication data
+ * Returns boolean indicating success (false if player nonexistant)
### Bans
* `minetest.get_ban_list()`: returns the ban list (same as `minetest.get_ban_description("")`)
@@ -5225,6 +5228,8 @@ Definition tables
create_auth = func(name, password),
-- ^ Create new auth data for player `name`
-- ^ Note that `password` is not plain-text but an arbitrary representation decided by the engine
+ delete_auth = func(name),
+ -- ^ Delete auth data of player `name`, returns boolean indicating success (false if player nonexistant)
set_password = func(name, password),
-- ^ Set password of player `name` to `password`
Auth data should be created if not present
@@ -5236,5 +5241,7 @@ Definition tables
-- ^ Returns boolean indicating success
record_login = func(name),
-- ^ Called when player joins, used for keeping track of last_login
+ iterate = func(),
+ -- ^ Returns an iterator (use with `for` loops) for all player names currently in the auth database
}