gameServer/Utils.hs
changeset 9448 04e0acfa7c2c
parent 9109 878f06e9c484
child 9702 27006953d901
--- a/gameServer/Utils.hs	Tue Sep 03 00:05:38 2013 +0400
+++ b/gameServer/Utils.hs	Tue Sep 03 22:35:57 2013 +0400
@@ -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