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/Framework/Communications/LoginService.cs | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index fc02ff6..5547c24 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -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
///
/// The existing response
/// The user profile
- public virtual void CustomiseResponse(LoginResponse response, UserProfileData theUser)
+ public virtual void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest)
{
}
--
cgit v1.1