More complete fix for FULLMAPCONFIG message, also add new known protocol versions qmlfrontend
authorunc0rr
Sun, 07 Dec 2014 22:22:39 +0300
branchqmlfrontend
changeset 10614 4afb4c4bf495
parent 10612 eb3c1a289a23
child 10616 20a2d5e6930a
More complete fix for FULLMAPCONFIG message, also add new known protocol versions
gameServer/Utils.hs
--- a/gameServer/Utils.hs	Thu Dec 04 00:34:40 2014 +0300
+++ b/gameServer/Utils.hs	Sun Dec 07 22:22:39 2014 +0300
@@ -113,6 +113,8 @@
             , (46, "0.9.20-dev")
             , (47, "0.9.20")
             , (48, "0.9.21-dev")
+            , (49, "0.9.21")
+            , (50, "0.9.22-dev")
             ]
 
 askFromConsole :: B.ByteString -> IO B.ByteString
@@ -201,7 +203,7 @@
                 : (filter (\(p, _) -> p /= "SCHEME") $ Map.toList pr))
 
         | clientProto cl < 48 = map (toAnswer cl) $
-                ("FULLMAPCONFIG", tail $ Map.elems mpr)
+                ("FULLMAPCONFIG", let l = Map.elems mpr in if length l > 5 then tail l else l)
                 : ("SCHEME", pr Map.! "SCHEME")
                 : (filter (\(p, _) -> p /= "SCHEME") $ Map.toList pr)