diff options
Diffstat (limited to 'src/scriptapi.cpp')
-rw-r--r-- | src/scriptapi.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 99c3767ae..e8ebecb5a 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -3551,10 +3551,7 @@ static int l_get_player_privs(lua_State *L) // Do it lua_newtable(L); int table = lua_gettop(L); - u64 privs_i = server->getPlayerAuthPrivs(name); - // Special case for the "name" setting (local player / server owner) - if(name == g_settings->get("name")) - privs_i = PRIV_ALL; + u64 privs_i = server->getPlayerEffectivePrivs(name); std::set<std::string> privs_s = privsToSet(privs_i); for(std::set<std::string>::const_iterator i = privs_s.begin(); i != privs_s.end(); i++){ |