Show "incompatible version" message instead of "no such room" on try to join room with another protocol version
authorunc0rr
Sat, 30 Nov 2013 17:43:58 +0400
changeset 9729 6a3640c4f4b7
parent 9728 320f89e0b28c
child 9730 20dca3377887
Show "incompatible version" message instead of "no such room" on try to join room with another protocol version
gameServer/HWProtoLobbyState.hs
--- a/gameServer/HWProtoLobbyState.hs	Sat Nov 30 14:36:41 2013 +0100
+++ b/gameServer/HWProtoLobbyState.hs	Sat Nov 30 17:43:58 2013 +0400
@@ -64,8 +64,10 @@
     let chans = map sendChan (cl : jRoomClients)
     let isBanned = host cl `elem` roomBansList jRoom
     return $
-        if isNothing maybeRI || not sameProto then
+        if isNothing maybeRI then
             [Warning $ loc "No such room"]
+            else if not sameProto then
+            [Warning $ loc "Room version incompatible to your hedgewars version"]
             else if isRestrictedJoins jRoom then
             [Warning $ loc "Joining restricted"]
             else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) then