aboutsummaryrefslogtreecommitdiff
path: root/src/scriptapi.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-15 15:27:16 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-15 15:38:59 +0200
commit5957fed9a7df9297dd218b6400d612434e87ac5a (patch)
treea4af7d28234fa59b4b54a8658e6c75544bf3dd2c /src/scriptapi.cpp
parent6298878bfa996754fad0e530a209411f72cfdfac (diff)
downloadminetest-5957fed9a7df9297dd218b6400d612434e87ac5a.tar.gz
minetest-5957fed9a7df9297dd218b6400d612434e87ac5a.tar.bz2
minetest-5957fed9a7df9297dd218b6400d612434e87ac5a.zip
Fix and improve Server's privilege get/setters
Diffstat (limited to 'src/scriptapi.cpp')
-rw-r--r--src/scriptapi.cpp5
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++){