forked from TeamUlysses/ulib
Fixes #36
This commit is contained in:
parent
06111c3b87
commit
0313791b62
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -1 +1 @@
|
||||
1490128846
|
||||
1503429294
|
||||
|
Loading…
Reference in New Issue
Block a user