From 4e30f862af218de783552ffc2ca68ae8a11509c5 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 18 Mar 2008 03:09:38 +0000 Subject: Building on Joha's update... * Server now listens to the client's start location request for 'home' or 'last' and sends the user to the home location or the last location. --- OpenSim/Grid/UserServer/UserLoginService.cs | 30 ++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'OpenSim/Grid/UserServer/UserLoginService.cs') diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index e03ac3a..c8d0619 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -71,7 +71,7 @@ namespace OpenSim.Grid.UserServer /// /// The existing response /// The user profile - public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) + public override void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest) { bool tryDefault = false; //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one. @@ -79,10 +79,30 @@ namespace OpenSim.Grid.UserServer try { - RegionProfileData SimInfo = - RegionProfileData.RequestSimProfileData( - theUser.currentAgent.currentHandle, m_config.GridServerURL, - m_config.GridSendKey, m_config.GridRecvKey); + RegionProfileData SimInfo = null; + if (startLocationRequest == "last") + { + SimInfo = + RegionProfileData.RequestSimProfileData( + theUser.currentAgent.currentHandle, m_config.GridServerURL, + m_config.GridSendKey, m_config.GridRecvKey); + } + else if (startLocationRequest == "home") + { + SimInfo = + RegionProfileData.RequestSimProfileData( + theUser.homeRegion, m_config.GridServerURL, + m_config.GridSendKey, m_config.GridRecvKey); + + } + else + { + // TODO: Parse out startlocationrequest string in the format; 'uri:RegionName&X&Y&Z' + SimInfo = + RegionProfileData.RequestSimProfileData( + theUser.currentAgent.currentHandle, m_config.GridServerURL, + m_config.GridSendKey, m_config.GridRecvKey); + } // Customise the response //CFK: This is redundant and the next message should always appear. -- cgit v1.1