summaryrefslogtreecommitdiff
path: root/chatcommands.lua
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-07-12 19:10:26 -0400
committerShadowNinja <shadowninja@minetest.net>2014-07-12 19:10:26 -0400
commit57c18fce9569f68822fb2814044d71ec99bf49e7 (patch)
tree81d8e8e63057c7a9f74c5c3da09b87abe6e80bda /chatcommands.lua
parent65013863b2ae1205f08000c83bdc3b6c8fab5627 (diff)
Make all admin checks use one table
Diffstat (limited to 'chatcommands.lua')
-rw-r--r--chatcommands.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/chatcommands.lua b/chatcommands.lua
index ecf521a..b467331 100644
--- a/chatcommands.lua
+++ b/chatcommands.lua
@@ -35,7 +35,7 @@ minetest.register_chatcommand("set_owner", {
description = "Protect an area beetween two positions and give"
.." a player access to it without setting the parent of the"
.." area to any existing area",
- privs = {areas=true},
+ privs = areas.adminPrivs,
func = function(name, param)
local ownerName, areaName = param:match('^(%S+)%s(.+)$')
@@ -175,7 +175,7 @@ minetest.register_chatcommand("find_areas", {
minetest.register_chatcommand("list_areas", {
description = "List your areas, or all areas if you are an admin.",
func = function(name, param)
- local admin = minetest.check_player_privs(name, {areas=true})
+ local admin = minetest.check_player_privs(name, areas.adminPrivs)
local areaStrings = {}
for id, area in pairs(areas.areas) do
if admin or areas:isAreaOwner(id, name) then