From dfc553d0a4c25d6c1f491b228e89402c0415acda Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 15 Aug 2008 13:13:39 +0000 Subject: Fix up master avatar handling for estate owners. Introduces a new hierarchical rights structure. MasterAvatar: Owner of the region server (may be null), net gods (users with GodLevel 200), Estate owner (from database). Look at Opensim.ini.example to enable net gods. Estate owner will default to master avatar. --- OpenSim/Region/DataSnapshot/EstateSnapshot.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/DataSnapshot') diff --git a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs index 99a4a0d..eccdcf1 100644 --- a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs @@ -28,6 +28,7 @@ using System; using System.Xml; using libsecondlife; +using OpenSim.Framework; using OpenSim.Region.DataSnapshot.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -50,15 +51,20 @@ namespace OpenSim.Region.DataSnapshot.Providers public XmlNode RequestSnapshotData(XmlDocument factory) { //Estate data section - contains who owns a set of sims and the name of the set. - //In Opensim all the estate names are the same as the Master Avatar (owner of the sim) //Now in DataSnapshotProvider module form! XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", ""); LLUUID ownerid = m_scene.RegionInfo.MasterAvatarAssignedUUID; + if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) + ownerid = m_scene.RegionInfo.EstateSettings.EstateOwner; + + // Can't fail because if it weren't in cache, we wouldn't be here + // + UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(ownerid); //TODO: Change to query userserver about the master avatar UUID ? - String firstname = m_scene.RegionInfo.MasterAvatarFirstName; - String lastname = m_scene.RegionInfo.MasterAvatarLastName; + String firstname = userProfile.FirstName; + String lastname = userProfile.SurName; //TODO: Fix the marshalling system to have less copypasta gruntwork XmlNode user = factory.CreateNode(XmlNodeType.Element, "user", ""); @@ -113,4 +119,4 @@ namespace OpenSim.Region.DataSnapshot.Providers #endregion } -} \ No newline at end of file +} -- cgit v1.1