More complete fix for FULLMAPCONFIG message, also add new known protocol versions
authorunc0rr
Wed, 24 Dec 2014 23:17:14 +0300
changeset 10718 40dda24ee145
parent 10717 0810826cdf80
child 10719 dd5e2427b3b2
child 10720 076aa3b2587d
More complete fix for FULLMAPCONFIG message, also add new known protocol versions
gameServer/Utils.hs
--- a/gameServer/Utils.hs	Wed Dec 24 14:42:05 2014 -0500
+++ b/gameServer/Utils.hs	Wed Dec 24 23:17:14 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)