summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-31 16:23:26 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-03-31 16:25:02 +0300
commit52122c342d335a2561ace87c9d8deaa16a136604 (patch)
tree33ed625674d82c505b347adf26307748c85c8cfc /doc
parent96ee73f79018c8aae22a392af6f66f9a05cb0174 (diff)
downloadminetest-52122c342d335a2561ace87c9d8deaa16a136604.tar.gz
minetest-52122c342d335a2561ace87c9d8deaa16a136604.tar.bz2
minetest-52122c342d335a2561ace87c9d8deaa16a136604.zip
Add 'fly' and 'fast' privileges and the underlying privileges-to-client system
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index a03d9a9e1..3ba59565b 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -506,7 +506,12 @@ minetest.register_on_respawnplayer(func(ObjectRef))
^ currently called _before_ repositioning of player occurs
minetest.register_on_chat_message(func(name, message))
minetest.register_chatcommand(cmd, chatcommand definition)
-minetest.register_privilege(name, description)
+minetest.register_privilege(name, definition)
+^ definition: "description text"
+^ definition: {
+ description = "description text",
+ give_to_singleplayer = boolean, -- default: true
+ }
minetest.register_authentication_handler(handler)
^ See minetest.builtin_auth_handler in builtin.lua for reference
@@ -516,13 +521,20 @@ minetest.setting_getbool(name) -> boolean value or nil
minetest.add_to_creative_inventory(itemstring)
Authentication:
+minetest.notify_authentication_modified(name)
+^ Should be called by the authentication handler if privileges change.
+^ To report everybody, set name=nil.
minetest.get_password_hash(name, raw_password)
-minetest.set_player_password(name, password_hash)
+^ Convert a name-password pair to a password hash that minetest can use
minetest.string_to_privs(str) -> {priv1=true,...}
minetest.privs_to_string(privs) -> "priv1,priv2,..."
+^ Convert between two privilege representations
+minetest.set_player_password(name, password_hash)
minetest.set_player_privs(name, {priv1=true,...})
minetest.get_player_privs(name) -> {priv1=true,...}
+^ These call the authentication handler
minetest.check_player_privs(name, {priv1=true,...}) -> bool, missing_privs
+^ A quickhand for checking privileges
Chat:
minetest.chat_send_all(text)