Use default color if we cant find it

This commit is contained in:
Brandon Sturgeon 2023-09-22 16:55:37 -07:00
parent 9aeae61d63
commit fc11cc59bc
No known key found for this signature in database
GPG Key ID: 93451558FC64495C

View File

@ -60,12 +60,13 @@ ChatTransit.Send = (data) =>
@WebSocket\write TableToJSON data
ChatTransit.GetRankColor = (ply) =>
groupName = ULib.ucl.users[ply\SteamID!].group
team = ULib.ucl.groups[groupName].team
user = ULib.ucl.users[ply\SteamID!]
groupName = user and user.group or "user"
team = ULib.ucl.groups[groupName].team
teamColor = "#{team.color_red} #{team.color_green} #{team.color_blue} 255"
teamColor
return teamColor
ChatTransit.guard = (f, delay) -> (...) ->
args = {...}