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.
This commit is contained in:
Teravus Ovares
2008-03-18 03:09:38 +00:00
parent 040a887b9c
commit 4e30f862af
3 changed files with 60 additions and 10 deletions

View File

@@ -93,6 +93,14 @@ namespace OpenSim.Framework.UserManagement
(requestData.Contains("passwd") || requestData.Contains("web_login_key")));
bool GoodLogin = false;
string startLocationRequest = "last";
if (requestData.Contains("start"))
{
startLocationRequest = (string)requestData["start"];
m_log.Info("[LOGIN]: Client Requested Start: " + (string)requestData["start"]);
}
UserProfileData userProfile;
LoginResponse logResponse = new LoginResponse();
@@ -213,7 +221,7 @@ namespace OpenSim.Framework.UserManagement
try
{
CustomiseResponse(logResponse, userProfile);
CustomiseResponse(logResponse, userProfile, startLocationRequest);
}
catch (Exception e)
{
@@ -252,6 +260,8 @@ namespace OpenSim.Framework.UserManagement
{
bool GoodLogin = false;
string startLocationRequest = "last";
UserProfileData userProfile = null;
LoginResponse logResponse = new LoginResponse();
@@ -265,6 +275,12 @@ namespace OpenSim.Framework.UserManagement
string lastname = map["last"].AsString();
string passwd = map["passwd"].AsString();
if (map.ContainsKey("start"))
{
m_log.Info("[LOGIN]: StartLocation Requested: " + map["start"].AsString());
startLocationRequest = map["start"].AsString();
}
userProfile = GetTheUser(firstname, lastname);
if (userProfile == null)
{
@@ -342,7 +358,7 @@ namespace OpenSim.Framework.UserManagement
try
{
CustomiseResponse(logResponse, userProfile);
CustomiseResponse(logResponse, userProfile, startLocationRequest);
}
catch (Exception ex)
{
@@ -376,7 +392,7 @@ namespace OpenSim.Framework.UserManagement
/// </summary>
/// <param name="response">The existing response</param>
/// <param name="theUser">The user profile</param>
public virtual void CustomiseResponse(LoginResponse response, UserProfileData theUser)
public virtual void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest)
{
}