--- a/gameServer/Actions.hs Tue Jan 25 22:13:34 2011 +0300
+++ b/gameServer/Actions.hs Tue Jan 25 22:23:08 2011 +0300
@@ -188,6 +188,7 @@
processAction $ AnswerClients chans ["JOINED", clNick]
+
processAction (MoveToLobby msg) = do
(Just ci) <- gets clientIndex
ri <- clientRoomA
--- 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
+
{-