Weird privileges
This commit is contained in:
parent
3bc2fd1c86
commit
a2866722ca
@ -45,7 +45,7 @@ local function give_kit(player, kit)
|
|||||||
if not player then return false, "Invalid player." end
|
if not player then return false, "Invalid player." end
|
||||||
|
|
||||||
local pname = player:get_player_name()
|
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
|
if kit_privs and not ess.priv_match(pname, "ess.kits.kit." .. kit) and
|
||||||
not allprivs and kit ~= kit_give then
|
not allprivs and kit ~= kit_give then
|
||||||
return false, "Insufficient permissions."
|
return false, "Insufficient permissions."
|
||||||
@ -175,8 +175,8 @@ local commands = {
|
|||||||
params = "( (delete | create) <kit> [<timeout>] ) | ( [<kit>] [<playername>] )",
|
params = "( (delete | create) <kit> [<timeout>] ) | ( [<kit>] [<playername>] )",
|
||||||
aliases = {"kit"},
|
aliases = {"kit"},
|
||||||
privs = {
|
privs = {
|
||||||
["ess.kits"] = true,
|
["ess.kits.kits"] = true,
|
||||||
["ess.kits.all"] = true,
|
["ess.kits.kits.all"] = true,
|
||||||
["ess.kits.other"] = true,
|
["ess.kits.other"] = true,
|
||||||
},
|
},
|
||||||
func = cmd_kits,
|
func = cmd_kits,
|
||||||
|
@ -65,7 +65,7 @@ local function cmd_warp(name,params,splitparams)
|
|||||||
end
|
end
|
||||||
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()
|
return ess.reject_permission()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -109,6 +109,7 @@ local commands = {
|
|||||||
aliases = {"warps"},
|
aliases = {"warps"},
|
||||||
privs = {
|
privs = {
|
||||||
["ess.warp.warp"] = true,
|
["ess.warp.warp"] = true,
|
||||||
|
["ess.warp.warp.all"] = true,
|
||||||
["ess.warp.other"] = true,
|
["ess.warp.other"] = true,
|
||||||
},
|
},
|
||||||
func = cmd_warp,
|
func = cmd_warp,
|
||||||
|
Loading…
Reference in New Issue
Block a user