gameServer/HWProtoLobbyState.hs
branchserver_refactor
changeset 4587 adf64662b6a8
parent 4571 597440c80b8a
child 4591 c91364bf6a69
--- a/gameServer/HWProtoLobbyState.hs	Tue Jan 25 22:13:34 2011 +0300
+++ b/gameServer/HWProtoLobbyState.hs	Tue Jan 25 22:23:08 2011 +0300
@@ -90,10 +90,17 @@
                 AnswerClients [sendChan cl] $ "JOINED" : map nick jRoomClients
             ]
             ++ (map (readynessMessage cl) jRoomClients)
+            ++ (answerFullConfig cl $ params jRoom)
 
-    where
+        where
         readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c]
 
+        toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs
+
+        answerFullConfig cl params = map (toAnswer cl) (leftConfigPart ++ rightConfigPart)
+            where
+            (leftConfigPart, rightConfigPart) = partition (\(p, _) -> p /= "MAP") $ Map.toList params
+
 
 
 {-