Skip to content

Commit

Permalink
Use default color if we cant find it
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonsturgeon committed Sep 22, 2023
1 parent 9aeae61 commit fc11cc5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions moon/cfc_chat_transit/server/init.moon
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {...}
Expand Down

0 comments on commit fc11cc5

Please sign in to comment.