basic_privs to allow granting/revoking interact_extra too
authorPerttu Ahola <celeron55@gmail.com>
Mon, 9 Apr 2012 21:41:28 +0000 (00:41 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 9 Apr 2012 21:41:28 +0000 (00:41 +0300)
builtin/chatcommands.lua

index a7061e3a3f0d47dc8222115206d68cc0b54887b2..e5d31c6aa0a08dea393612f2d809dadcecb5f19f 100644 (file)
@@ -130,7 +130,7 @@ minetest.register_chatcommand("grant", {
                local privs = minetest.get_player_privs(grantname)
                local privs_known = true
                for priv, _ in pairs(grantprivs) do
-                       if priv ~= "interact" and priv ~= "shout" and not minetest.check_player_privs(name, {privs=true}) then
+                       if priv ~= "interact" and priv ~= "shout" and priv ~= "interact_extra" and not minetest.check_player_privs(name, {privs=true}) then
                                minetest.chat_send_player(name, "Your privileges are insufficient.")
                                return
                        end
@@ -168,7 +168,7 @@ minetest.register_chatcommand("revoke", {
                local revokeprivs = minetest.string_to_privs(revokeprivstr)
                local privs = minetest.get_player_privs(revokename)
                for priv, _ in pairs(revokeprivs) do
-                       if priv ~= "interact" and priv ~= "shout" and not minetest.check_player_privs(name, {privs=true}) then
+                       if priv ~= "interact" and priv ~= "shout" and priv ~= "interact_extra" and not minetest.check_player_privs(name, {privs=true}) then
                                minetest.chat_send_player(name, "Your privileges are insufficient.")
                                return
                        end