equal
deleted
inserted
replaced
135 Map.findWithDefault "+rnd+" "MAP" (mapParams r), |
135 Map.findWithDefault "+rnd+" "MAP" (mapParams r), |
136 head (Map.findWithDefault ["Default"] "SCHEME" (params r)), |
136 head (Map.findWithDefault ["Default"] "SCHEME" (params r)), |
137 head (Map.findWithDefault ["Default"] "AMMO" (params r)) |
137 head (Map.findWithDefault ["Default"] "AMMO" (params r)) |
138 ] |
138 ] |
139 |
139 |
|
140 |
|
141 answerFullConfigParams :: |
|
142 ClientInfo |
|
143 -> Map.Map B.ByteString B.ByteString |
|
144 -> Map.Map B.ByteString [B.ByteString] |
|
145 -> [Action] |
|
146 answerFullConfigParams cl mpr pr |
|
147 | clientProto cl < 38 = map (toAnswer cl) $ |
|
148 (reverse . map (\(a, b) -> (a, [b])) $ Map.toList mpr) |
|
149 ++ (("SCHEME", pr Map.! "SCHEME") |
|
150 : (filter (\(p, _) -> p /= "SCHEME") $ Map.toList pr)) |
|
151 |
|
152 | otherwise = map (toAnswer cl) $ |
|
153 ("FULLMAPCONFIG", Map.elems mpr) |
|
154 : ("SCHEME", pr Map.! "SCHEME") |
|
155 : (filter (\(p, _) -> p /= "SCHEME") $ Map.toList pr) |
|
156 where |
|
157 toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs |
|
158 |
|
159 |
140 loc :: B.ByteString -> B.ByteString |
160 loc :: B.ByteString -> B.ByteString |
141 loc = id |
161 loc = id |