gameServer/HWProtoLobbyState.hs
changeset 11467 f2c36df8c7b1
parent 11464 a9957113404a
child 12114 cdadc1d487f1
equal deleted inserted replaced
11466:4b5c7a5c49fd 11467:f2c36df8c7b1
    91     return $
    91     return $
    92         if isNothing maybeRI then
    92         if isNothing maybeRI then
    93             [Warning $ loc "No such room"]
    93             [Warning $ loc "No such room"]
    94             else if (not sameProto) && (not $ isAdministrator cl) then
    94             else if (not sameProto) && (not $ isAdministrator cl) then
    95             [Warning $ loc "Room version incompatible to your hedgewars version"]
    95             [Warning $ loc "Room version incompatible to your hedgewars version"]
    96             else if isRestrictedJoins jRoom then
    96             else if isRestrictedJoins jRoom && not (hasSuperPower cl) then
    97             [Warning $ loc "Joining restricted"]
    97             [Warning $ loc "Joining restricted"]
    98             else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) && not (isAdministrator cl) then
    98             else if isRegisteredOnly jRoom && (B.null . webPassword $ cl) && not (isAdministrator cl) then
    99             [Warning $ loc "Registered users only"]
    99             [Warning $ loc "Registered users only"]
   100             else if isBanned then
   100             else if isBanned then
   101             [Warning $ loc "You are banned in this room"]
   101             [Warning $ loc "You are banned in this room"]
   102             else if roomPassword /= password jRoom then
   102             else if roomPassword /= password jRoom  && not (hasSuperPower cl) then
   103             [NoticeMessage WrongPassword]
   103             [NoticeMessage WrongPassword]
   104             else
   104             else
   105             (
   105             (
   106                 MoveToRoom jRI
   106                 MoveToRoom jRI
   107                 : ModifyClient (\c -> c{isJoinedMidGame = isJust $ gameInfo jRoom
   107                 : ModifyClient (\c -> c{isJoinedMidGame = isJust $ gameInfo jRoom