Weird privileges

This commit is contained in:
Evert Prants 2019-11-12 20:39:49 +02:00
parent 3bc2fd1c86
commit a2866722ca
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 5 additions and 4 deletions

View File

@ -45,7 +45,7 @@ local function give_kit(player, kit)
if not player then return false, "Invalid player." end
local pname = player:get_player_name()
local allprivs = ess.priv_match(pname, "ess.kits.all")
local allprivs = ess.priv_match(pname, "ess.kits.kits.all")
if kit_privs and not ess.priv_match(pname, "ess.kits.kit." .. kit) and
not allprivs and kit ~= kit_give then
return false, "Insufficient permissions."
@ -175,8 +175,8 @@ local commands = {
params = "( (delete | create) <kit> [<timeout>] ) | ( [<kit>] [<playername>] )",
aliases = {"kit"},
privs = {
["ess.kits"] = true,
["ess.kits.all"] = true,
["ess.kits.kits"] = true,
["ess.kits.kits.all"] = true,
["ess.kits.other"] = true,
},
func = cmd_kits,

View File

@ -65,7 +65,7 @@ local function cmd_warp(name,params,splitparams)
end
end
if warp_privs and not (ess.priv_match(pname, "ess.warps.warp." .. location) or ess.priv_match(pname, "ess.warp.all")) then
if warp_privs and not (ess.priv_match(pname, "ess.warp.warp." .. location) or ess.priv_match(pname, "ess.warp.warp.all")) then
return ess.reject_permission()
end
@ -109,6 +109,7 @@ local commands = {
aliases = {"warps"},
privs = {
["ess.warp.warp"] = true,
["ess.warp.warp.all"] = true,
["ess.warp.other"] = true,
},
func = cmd_warp,