gameServer/Utils.hs
changeset 9448 04e0acfa7c2c
parent 9109 878f06e9c484
child 9702 27006953d901
equal deleted inserted replaced
9446:4fd5df03deb8 9448:04e0acfa7c2c
   155                 : (filter (\(p, _) -> p /= "SCHEME") $ Map.toList pr)
   155                 : (filter (\(p, _) -> p /= "SCHEME") $ Map.toList pr)
   156     where
   156     where
   157         toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs
   157         toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs
   158 
   158 
   159 
   159 
       
   160 answerAllTeams :: ClientInfo -> [TeamInfo] -> [Action]
       
   161 answerAllTeams cl = concatMap toAnswer
       
   162     where
       
   163         clChan = sendChan cl
       
   164         toAnswer team =
       
   165             [AnswerClients [clChan] $ teamToNet team,
       
   166             AnswerClients [clChan] ["TEAM_COLOR", teamname team, teamcolor team],
       
   167             AnswerClients [clChan] ["HH_NUM", teamname team, showB $ hhnum team]]
       
   168 
       
   169 
   160 loc :: B.ByteString -> B.ByteString
   170 loc :: B.ByteString -> B.ByteString
   161 loc = id
   171 loc = id