gameServer/HWProtoLobbyState.hs
changeset 12114 cdadc1d487f1
parent 11467 f2c36df8c7b1
child 13079 81c154fd4380
--- a/gameServer/HWProtoLobbyState.hs	Fri Dec 23 23:12:00 2016 +0300
+++ b/gameServer/HWProtoLobbyState.hs	Fri Dec 23 23:29:00 2016 +0300
@@ -83,7 +83,7 @@
     let chans = map sendChan (cl : jRoomClients)
     let isBanned = host cl `elem` roomBansList jRoom
     let clTeams =
-            if (clientProto cl >= 48) && (isJust $ gameInfo jRoom) then
+            if (clientProto cl >= 48) && (isJust $ gameInfo jRoom) && isRegistered cl then
                 filter (\t -> teamowner t == nick cl) . teamsAtStart . fromJust $ gameInfo jRoom 
                 else
                 []
@@ -95,7 +95,7 @@
             [Warning $ loc "Room version incompatible to your hedgewars version"]
             else if isRestrictedJoins jRoom && not (hasSuperPower cl) then
             [Warning $ loc "Joining restricted"]
-            else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) && not (isAdministrator cl) then
+            else if isRegisteredOnly jRoom && (not $ isRegistered cl) && not (isAdministrator cl) then
             [Warning $ loc "Registered users only"]
             else if isBanned then
             [Warning $ loc "You are banned in this room"]