Some more work to help prevent players naming themselves after keywords.

This commit is contained in:
Nayruden 2016-01-03 15:53:57 -05:00
parent 3013bf57af
commit 7eda6192c7
2 changed files with 3 additions and 2 deletions

View File

@ -484,7 +484,8 @@ function cmds.PlayerArg:processRestrictions( ply, cmdRestrictions, plyRestrictio
end
if ply:IsValid() and not ignore_can_target and not table.HasValue( cmdRestrictions, cmds.ignoreCanTarget ) and ULib.ucl.getGroupCanTarget( ply:GetUserGroup() ) then -- can_target restriction
local restricted = ULib.getUsers( ULib.ucl.getGroupCanTarget( ply:GetUserGroup() ) .. ",^", true, ply ) -- Allow self on top of restrictions
local selfTarget = "$" .. ULib.getUniqueIDForPlayer( ply )
local restricted = ULib.getUsers( ULib.ucl.getGroupCanTarget( ply:GetUserGroup() ) .. "," .. selfTarget, true, ply ) -- Allow self on top of restrictions
if not restricted or not self.restrictedTargets then -- Easy, just set it
self.restrictedTargets = restricted

View File

@ -1 +1 @@
1451851974
1451854437