This commit is contained in:
Nayruden 2017-08-22 14:14:54 -05:00
parent 06111c3b87
commit 0313791b62
3 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# ULib Changelog
## v2.64 - *(00/00/00)*
* [FIX] Lua error with unspecified optional player arguments from server console (thanks, Timmy).
## v2.63 - *(03/21/17)*
* [FIX] Server errors when loading massive ban lists.

View File

@ -512,6 +512,10 @@ function cmds.PlayerArg:parseAndValidate( ply, arg, cmdInfo, plyRestrictions )
self:processRestrictions( ply, cmdInfo, plyRestrictions )
if not arg and table.HasValue( cmdInfo, cmds.optional ) then
if not cmdInfo.default and not ply:IsValid() then
return nil, "target must be specified"
end
arg = cmdInfo.default or "$" .. ULib.getUniqueIDForPlayer( ply ) -- Set it, needs to go through our process
end
@ -623,6 +627,10 @@ function cmds.PlayersArg:parseAndValidate( ply, arg, cmdInfo, plyRestrictions )
self:processRestrictions( ply, cmdInfo, plyRestrictions )
if not arg and table.HasValue( cmdInfo, cmds.optional ) then
if not cmdInfo.default and not ply:IsValid() then
return nil, "target must be specified"
end
arg = cmdInfo.default or "$" .. ULib.getUniqueIDForPlayer( ply ) -- Set it, needs to go through our process
end

View File

@ -1 +1 @@
1490128846
1503429294