mirror of
https://github.com/Aaron113/urs.git
synced 2025-03-04 03:13:11 -05:00
Fixed bug in URSCheck where restricting to * didn't restrict to all users
Signed-off-by: Cara Vita <arekuanubis@gmail.com>
This commit is contained in:
parent
cba9cfc5c2
commit
ab9202ff23
@ -25,15 +25,23 @@ end
|
||||
function URSCheck( ply, type, what, noecho )
|
||||
what = string.lower( what )
|
||||
local group = ply:GetUserGroup()
|
||||
if restrictions[type][what] and (table.HasValue(restrictions[type][what], group) or table.HasValue(restrictions[type][what], "*") or table.HasValue(restrictions[type][what], ply:SteamID())) then
|
||||
if !table.HasValue(restrictions[type][what], "*") and (!table.HasValue( restrictions[type][what], ply:SteamID()) and table.HasValue(restrictions[type][what], group)) then
|
||||
if restrictions[type][what] then
|
||||
if table.HasValue(restrictions[type][what], "*") then
|
||||
if !(table.HasValue(restrictions[type][what], group) or table.HasValue(restrictions[type][what], ply:SteamID())) then
|
||||
if !noecho then
|
||||
ulx.logSpawn( ply:Nick() .."<".. ply:SteamID() .."> spawned/used ".. type .." ".. what .." -=RESTRICTED=-" )
|
||||
ULib.tsayError( ply, "\"".. what .."\" is a restricted ".. type .." from your rank." )
|
||||
end
|
||||
return false
|
||||
end
|
||||
elseif (table.HasValue( restrictions[type][what], ply:SteamID()) and table.HasValue(restrictions[type][what], group)) then
|
||||
if !noecho then
|
||||
ulx.logSpawn( ply:Nick() .."<".. ply:SteamID() .."> spawned/used ".. type .." ".. what .." -=RESTRICTED=-" )
|
||||
ULib.tsayError( ply, "\"".. what .."\" is a restricted ".. type .." from your rank." )
|
||||
end
|
||||
return false
|
||||
end
|
||||
elseif restrictions["all"][type] and table.HasValue(restrictions["all"][type], group) then
|
||||
elseif (restrictions["all"][type] and table.HasValue(restrictions["all"][type], group)) then
|
||||
if !noecho then
|
||||
ULib.tsayError( ply, "Your rank is restricted from all ".. type .."s" )
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user