equal
deleted
inserted
replaced
88 MoveToRoom jRI, |
88 MoveToRoom jRI, |
89 AnswerClients (map sendChan $ cl : jRoomClients) ["NOT_READY", nick cl], |
89 AnswerClients (map sendChan $ cl : jRoomClients) ["NOT_READY", nick cl], |
90 AnswerClients [sendChan cl] $ "JOINED" : map nick jRoomClients |
90 AnswerClients [sendChan cl] $ "JOINED" : map nick jRoomClients |
91 ] |
91 ] |
92 ++ (map (readynessMessage cl) jRoomClients) |
92 ++ (map (readynessMessage cl) jRoomClients) |
93 |
93 ++ (answerFullConfig cl $ params jRoom) |
94 where |
94 |
|
95 where |
95 readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c] |
96 readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c] |
|
97 |
|
98 toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs |
|
99 |
|
100 answerFullConfig cl params = map (toAnswer cl) (leftConfigPart ++ rightConfigPart) |
|
101 where |
|
102 (leftConfigPart, rightConfigPart) = partition (\(p, _) -> p /= "MAP") $ Map.toList params |
96 |
103 |
97 |
104 |
98 |
105 |
99 {- |
106 {- |
100 |
107 |