gameServer/Utils.hs
branchwebgl
changeset 9521 8054d9d775fd
parent 9448 04e0acfa7c2c
child 9702 27006953d901
--- a/gameServer/Utils.hs	Fri Oct 11 11:55:31 2013 +0200
+++ b/gameServer/Utils.hs	Fri Oct 11 17:43:13 2013 +0200
@@ -157,5 +157,15 @@
         toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs
 
 
+answerAllTeams :: ClientInfo -> [TeamInfo] -> [Action]
+answerAllTeams cl = concatMap toAnswer
+    where
+        clChan = sendChan cl
+        toAnswer team =
+            [AnswerClients [clChan] $ teamToNet team,
+            AnswerClients [clChan] ["TEAM_COLOR", teamname team, teamcolor team],
+            AnswerClients [clChan] ["HH_NUM", teamname team, showB $ hhnum team]]
+
+
 loc :: B.ByteString -> B.ByteString
 loc = id