UCL Helper Function

Adding a helper function to UCL to grab information about a player entry
by steamid/ip/uid.
This commit is contained in:
MrPresident 2015-05-07 12:53:31 -07:00
parent 6690bba964
commit 71ae36fa6b

View File

@ -549,6 +549,29 @@ function ucl.getUserRegisteredID( ply )
end
end
--[[
Function: ucl.getUserInfoFromID
Returns a table containing the name and group of a player in the UCL table of users if they exist.
Parameters:
id - The SteamID, IP, or UniqueID of the user you wish to check.
]]
function ucl.getUserInfoFromID( id )
ULib.checkArg( 1, "ULib.ucl.addUser", "string", id )
id = id:upper() -- In case of steamid, needs to be upper case
if ucl.users[ id ] then
return ucl.users[ id ]
else
return nil
end
end
--[[
Function: ucl.addUser