diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-31 16:23:26 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-31 16:25:02 +0300 |
commit | 52122c342d335a2561ace87c9d8deaa16a136604 (patch) | |
tree | 33ed625674d82c505b347adf26307748c85c8cfc /src/scriptapi.cpp | |
parent | 96ee73f79018c8aae22a392af6f66f9a05cb0174 (diff) | |
download | minetest-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 'src/scriptapi.cpp')
-rw-r--r-- | src/scriptapi.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index a9f54627d..a86c56f9c 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -3985,6 +3985,16 @@ static int l_get_password_hash(lua_State *L) return 1; } +// notify_authentication_modified(name) +static int l_notify_authentication_modified(lua_State *L) +{ + std::string name = ""; + if(lua_isstring(L, 1)) + name = lua_tostring(L, 1); + get_server(L)->reportPrivsModified(name); + return 0; +} + static const struct luaL_Reg minetest_f [] = { {"debug", l_debug}, {"log", l_log}, @@ -4006,6 +4016,7 @@ static const struct luaL_Reg minetest_f [] = { {"sound_stop", l_sound_stop}, {"is_singleplayer", l_is_singleplayer}, {"get_password_hash", l_get_password_hash}, + {"notify_authentication_modified", l_notify_authentication_modified}, {NULL, NULL} }; |