aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/DataSnapshot
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-15 13:13:39 +0000
committerMelanie Thielker2008-08-15 13:13:39 +0000
commitdfc553d0a4c25d6c1f491b228e89402c0415acda (patch)
tree63653f47cc17365ec828f2e5507b7fd75c0388be /OpenSim/Region/DataSnapshot
parentMinor formatting cleanup. (diff)
downloadopensim-SC_OLD-dfc553d0a4c25d6c1f491b228e89402c0415acda.zip
opensim-SC_OLD-dfc553d0a4c25d6c1f491b228e89402c0415acda.tar.gz
opensim-SC_OLD-dfc553d0a4c25d6c1f491b228e89402c0415acda.tar.bz2
opensim-SC_OLD-dfc553d0a4c25d6c1f491b228e89402c0415acda.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/DataSnapshot')
-rw-r--r--OpenSim/Region/DataSnapshot/EstateSnapshot.cs14
1 files changed, 10 insertions, 4 deletions
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 @@
28using System; 28using System;
29using System.Xml; 29using System.Xml;
30using libsecondlife; 30using libsecondlife;
31using OpenSim.Framework;
31using OpenSim.Region.DataSnapshot.Interfaces; 32using OpenSim.Region.DataSnapshot.Interfaces;
32using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
33 34
@@ -50,15 +51,20 @@ namespace OpenSim.Region.DataSnapshot.Providers
50 public XmlNode RequestSnapshotData(XmlDocument factory) 51 public XmlNode RequestSnapshotData(XmlDocument factory)
51 { 52 {
52 //Estate data section - contains who owns a set of sims and the name of the set. 53 //Estate data section - contains who owns a set of sims and the name of the set.
53 //In Opensim all the estate names are the same as the Master Avatar (owner of the sim)
54 //Now in DataSnapshotProvider module form! 54 //Now in DataSnapshotProvider module form!
55 XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", ""); 55 XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", "");
56 56
57 LLUUID ownerid = m_scene.RegionInfo.MasterAvatarAssignedUUID; 57 LLUUID ownerid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
58 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero)
59 ownerid = m_scene.RegionInfo.EstateSettings.EstateOwner;
60
61 // Can't fail because if it weren't in cache, we wouldn't be here
62 //
63 UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(ownerid);
58 64
59 //TODO: Change to query userserver about the master avatar UUID ? 65 //TODO: Change to query userserver about the master avatar UUID ?
60 String firstname = m_scene.RegionInfo.MasterAvatarFirstName; 66 String firstname = userProfile.FirstName;
61 String lastname = m_scene.RegionInfo.MasterAvatarLastName; 67 String lastname = userProfile.SurName;
62 68
63 //TODO: Fix the marshalling system to have less copypasta gruntwork 69 //TODO: Fix the marshalling system to have less copypasta gruntwork
64 XmlNode user = factory.CreateNode(XmlNodeType.Element, "user", ""); 70 XmlNode user = factory.CreateNode(XmlNodeType.Element, "user", "");
@@ -113,4 +119,4 @@ namespace OpenSim.Region.DataSnapshot.Providers
113 119
114 #endregion 120 #endregion
115 } 121 }
116} \ No newline at end of file 122}