From 108d89f89436556c8f4662197903c374db943f7d Mon Sep 17 00:00:00 2001
From: mingchen
Date: Thu, 28 Jun 2007 16:17:20 +0000
Subject: *Master User is now set up *Added support for getting user profile
information from remote grid server (untested) *Updated prebuild.xml
---
OpenSim/Region/Application/OpenSim.csproj | 12 +++--
OpenSim/Region/Application/OpenSim.exe.build | 3 +-
OpenSim/Region/Application/OpenSimMain.cs | 11 +++-
.../OpenSim.Region.Capabilities.csproj | 20 +++----
.../OpenSim.Region.Capabilities.dll.build | 16 +++---
.../ClientStack/OpenSim.Region.ClientStack.csproj | 18 +++----
.../OpenSim.Region.ClientStack.dll.build | 12 ++---
.../Communications/Local/CommunicationsLocal.cs | 2 +-
.../OpenSim.Region.Communications.Local.csproj | 6 +--
.../OpenSim.Region.Communications.Local.dll.build | 2 +-
.../Region/Communications/OGS1/GridCommsManager.cs | 2 +-
.../Region/Communications/OGS1/OGSUserServices.cs | 63 ++++++++++++++++++++++
.../OGS1/OpenSim.Region.Communications.OGS1.csproj | 4 +-
.../OpenSim.Region.Communications.OGS1.dll.build | 4 +-
.../Environment/OpenSim.Region.Environment.csproj | 34 ++++++------
.../OpenSim.Region.Environment.dll.build | 26 ++++-----
.../OpenSim.Region.Storage.LocalStorageDb4o.csproj | 6 +--
...enSim.Region.Storage.LocalStorageDb4o.dll.build | 2 +-
18 files changed, 161 insertions(+), 82 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/OpenSim.csproj b/OpenSim/Region/Application/OpenSim.csproj
index 5cefa96..f5da23d 100644
--- a/OpenSim/Region/Application/OpenSim.csproj
+++ b/OpenSim/Region/Application/OpenSim.csproj
@@ -102,6 +102,12 @@
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
False
+
+ OpenSim.Framework.Data
+ {36B72A9B-0000-0000-0000-000000000000}
+ {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ False
+
OpenSim.Framework.GenericConfig.Xml
{C74E4A30-0000-0000-0000-000000000000}
@@ -164,13 +170,13 @@
-
+
Code
-
+
Code
-
+
Code
diff --git a/OpenSim/Region/Application/OpenSim.exe.build b/OpenSim/Region/Application/OpenSim.exe.build
index 74eee5b..9890cfa 100644
--- a/OpenSim/Region/Application/OpenSim.exe.build
+++ b/OpenSim/Region/Application/OpenSim.exe.build
@@ -11,9 +11,9 @@
+
-
@@ -26,6 +26,7 @@
+
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 7bf6b8d..6e600b8 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -42,6 +42,8 @@ using OpenSim.Region.Environment;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Terrain;
using OpenSim.Framework.Interfaces;
+using OpenSim.Framework.Data;
+
using OpenSim.Framework.Types;
using OpenSim.Framework;
using OpenSim.Assets;
@@ -250,7 +252,14 @@ namespace OpenSim
LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine);
LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D());
LocalWorld.LoadPrimsFromStorage();
- LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager);
+
+ //Master Avatar Setup
+ UserProfileData masterAvatar = commsManager.UserServer.SetupMasterUser(LocalWorld.RegionInfo.MasterAvatarFirstName, LocalWorld.RegionInfo.MasterAvatarLastName, LocalWorld.RegionInfo.MasterAvatarSandboxPassword);
+ if (masterAvatar != null)
+ {
+ LocalWorld.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
+ LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager);
+ }
LocalWorld.StartTimer();
diff --git a/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj
index 4667d52..1ed28d2 100644
--- a/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj
+++ b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj
@@ -96,40 +96,40 @@
-
+
Code
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
Code
-
+
Code
-
+
Code
-
+
Code
diff --git a/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build
index a091b5c..dd853e7 100644
--- a/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build
+++ b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build
@@ -11,18 +11,18 @@
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.csproj b/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.csproj
index 3093eb0..2e1d8e2 100644
--- a/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.csproj
+++ b/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.csproj
@@ -122,34 +122,34 @@
-
+
Code
-
+
Code
-
+
Code
-
+
Code
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
diff --git a/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.dll.build b/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.dll.build
index f76a4c8..1c791d3 100644
--- a/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.dll.build
+++ b/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.dll.build
@@ -11,16 +11,16 @@
-
-
-
+
+
+
+
-
-
-
+
+
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index f5aa8ae..bacaa3e 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Communications.Local
public CommunicationsLocal(NetworkServersInfo serversInfo)
: base(serversInfo)
{
- UserServices = new LocalUserServices(this , serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY);
+ UserServices = new LocalUserServices(this,this.ServersInfo.DefaultHomeLocX,this.ServersInfo.DefaultHomeLocY);
UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
UserServer = UserServices;
GridServer = SandBoxServices;
diff --git a/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj
index 0a15a49..200fa3a 100644
--- a/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj
+++ b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj
@@ -98,15 +98,15 @@
-
- Code
-
Code
Code
+
+ Code
+
Code
diff --git a/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build
index 3cac9d3..60a90bd 100644
--- a/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build
+++ b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build
@@ -11,9 +11,9 @@
-
+
diff --git a/OpenSim/Region/Communications/OGS1/GridCommsManager.cs b/OpenSim/Region/Communications/OGS1/GridCommsManager.cs
index 77848fa..2bf9536 100644
--- a/OpenSim/Region/Communications/OGS1/GridCommsManager.cs
+++ b/OpenSim/Region/Communications/OGS1/GridCommsManager.cs
@@ -12,7 +12,7 @@ namespace OpenSim.Region.Communications.OGS1
{
GridServer = gridInterComms;
InterRegion = gridInterComms;
- UserServer = new OGSUserServices();
+ UserServer = new OGSUserServices(this);
}
}
}
diff --git a/OpenSim/Region/Communications/OGS1/OGSUserServices.cs b/OpenSim/Region/Communications/OGS1/OGSUserServices.cs
index 48d3018..d41bdaf 100644
--- a/OpenSim/Region/Communications/OGS1/OGSUserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGSUserServices.cs
@@ -1,24 +1,87 @@
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Text;
+using OpenSim.Framework.Types;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Data;
using libsecondlife;
+using Nwc.XmlRpc;
+
namespace OpenSim.Region.Communications.OGS1
{
public class OGSUserServices :IUserServices
{
+ GridCommsManager m_parent;
+ public OGSUserServices(GridCommsManager parent)
+ {
+ m_parent = parent;
+ }
+
+ public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data)
+ {
+ UserProfileData userData = new UserProfileData();
+ userData.username = (string)data["firstname"];
+ userData.surname = (string)data["lastname"];
+ userData.UUID = new LLUUID((string)data["uuid"]);
+ userData.userInventoryURI = (string)data["server_inventory"];
+ userData.userAssetURI = (string)data["server_asset"];
+ userData.profileFirstText = (string)data["profile_firstlife_about"];
+ userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
+ userData.profileCanDoMask = (uint)data["profile_can_do"];
+ userData.profileWantDoMask = (uint)data["profile_want_do"];
+ userData.profileImage = new LLUUID((string)data["profile_image"]);
+ userData.lastLogin = (int)data["profile_lastlogin"];
+ userData.homeLocation = new LLVector3();
+ userData.homeLookAt = new LLVector3();
+
+ return userData;
+ }
public UserProfileData GetUserProfile(string firstName, string lastName)
{
return GetUserProfile(firstName + " " + lastName);
}
public UserProfileData GetUserProfile(string name)
{
+
+ try
+ {
+ Hashtable param = new Hashtable();
+ param["avatar_name"] = name;
+ IList parameters = new ArrayList();
+ parameters.Add(param);
+ XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters);
+ XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
+ Hashtable respData = (Hashtable)resp.Value;
+
+ return ConvertXMLRPCDataToUserProfile(respData);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Error when trying to fetch profile data by name from remote user server: " + e.Message);
+ }
return null;
}
public UserProfileData GetUserProfile(LLUUID avatarID)
{
+ try
+ {
+
+ Hashtable param = new Hashtable();
+ param["avatar_uuid"] = avatarID.ToString();
+ IList parameters = new ArrayList();
+ parameters.Add(param);
+ XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters);
+ XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
+ Hashtable respData = (Hashtable)resp.Value;
+
+ return ConvertXMLRPCDataToUserProfile(respData);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + e.Message);
+ }
return null;
}
diff --git a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
index 8cc5641..2124bd9 100644
--- a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
+++ b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
@@ -116,13 +116,13 @@
-
+
Code
Code
-
+
Code
diff --git a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
index 21bb15c..1a7cf69 100644
--- a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
+++ b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
@@ -11,9 +11,9 @@
-
-
+
+
diff --git a/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj b/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj
index 4069454..9f8d2c3 100644
--- a/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj
+++ b/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj
@@ -148,64 +148,64 @@
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
Code
-
+
Code
Code
-
+
Code
-
+
Code
diff --git a/OpenSim/Region/Environment/OpenSim.Region.Environment.dll.build b/OpenSim/Region/Environment/OpenSim.Region.Environment.dll.build
index 51924d5..667f1d7 100644
--- a/OpenSim/Region/Environment/OpenSim.Region.Environment.dll.build
+++ b/OpenSim/Region/Environment/OpenSim.Region.Environment.dll.build
@@ -11,26 +11,26 @@
+
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj
index 147158c..716fd57 100644
--- a/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj
@@ -93,9 +93,6 @@
Code
-
- Code
-
Code
@@ -105,6 +102,9 @@
Code
+
+ Code
+
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.dll.build b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.dll.build
index fc9f055..112ff1c 100644
--- a/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.dll.build
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.dll.build
@@ -12,10 +12,10 @@
-
+
--
cgit v1.1