From 3c90d834eac382af5edf091e83aea1ffcce91792 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 10 Jan 2010 22:41:42 +0000 Subject: Remove all references to master avatar, replacing with estate owner where appropriate. This changes the behavior of the REST plugins and RemoteAdmin's region creation process. --- .../RemoteController/RemoteAdminPlugin.cs | 40 ++-------------------- .../Rest/Regions/GETRegionInfoHandler.cs | 8 ----- .../Rest/Regions/RegionDetails.cs | 9 +---- 3 files changed, 3 insertions(+), 54 deletions(-) (limited to 'OpenSim/ApplicationPlugins') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index a82d25a..0a7b990 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -584,45 +584,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController { // ok, client wants us to use an explicit UUID // regardless of what the avatar name provided - userID = new UUID((string) requestData["region_master_uuid"]); + userID = new UUID((string) requestData["estate_owner_uuid"]); } - else - { - if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar - { - // no client supplied UUID: look it up... - UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; - UserAccount account = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, masterFirst, masterLast); - if (null == account) - { - m_log.InfoFormat("master avatar does not exist, creating it"); - // ...or create new user - - account = new UserAccount(scopeID, masterFirst, masterLast, ""); - bool success = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.StoreUserAccount(account); - if (success) - { - GridRegion home = m_app.SceneManager.CurrentOrFirstScene.GridService.GetRegionByPosition(scopeID, - (int)(region.RegionLocX * Constants.RegionSize), (int)(region.RegionLocY * Constants.RegionSize)); - - m_app.SceneManager.CurrentOrFirstScene.PresenceService.SetHomeLocation(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); - } - else - throw new Exception(String.Format("failed to create new user {0} {1}", - masterFirst, masterLast)); - - } - else - { - userID = account.PrincipalID; - } - } - } - - region.MasterAvatarFirstName = masterFirst; - region.MasterAvatarLastName = masterLast; - region.MasterAvatarSandboxPassword = masterPassword; - region.MasterAvatarAssignedUUID = userID; bool persist = Convert.ToBoolean((string) requestData["persist"]); if (persist) @@ -667,6 +630,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController // If an access specification was provided, use it. // Otherwise accept the default. newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess); + newscene.RegionInfo.EstateSettings.EstateOwner = userID; if (persist) newscene.RegionInfo.EstateSettings.Save(); diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs index 5798286..734b668 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs @@ -113,14 +113,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions rxw.WriteString(s.RegionInfo.ExternalHostName); rxw.WriteEndAttribute(); - rxw.WriteStartAttribute(String.Empty, "master_name", String.Empty); - rxw.WriteString(String.Format("{0} {1}", s.RegionInfo.MasterAvatarFirstName, s.RegionInfo.MasterAvatarLastName)); - rxw.WriteEndAttribute(); - - rxw.WriteStartAttribute(String.Empty, "master_uuid", String.Empty); - rxw.WriteString(s.RegionInfo.MasterAvatarAssignedUUID.ToString()); - rxw.WriteEndAttribute(); - rxw.WriteStartAttribute(String.Empty, "ip", String.Empty); rxw.WriteString(s.RegionInfo.InternalEndPoint.ToString()); rxw.WriteEndAttribute(); diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs index 746d08d..5e76009 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs @@ -56,20 +56,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions region_id = regInfo.RegionID.ToString(); region_x = regInfo.RegionLocX; region_y = regInfo.RegionLocY; - if (regInfo.EstateSettings.EstateOwner != UUID.Zero) - region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); - else - region_owner_id = regInfo.MasterAvatarAssignedUUID.ToString(); + region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); region_http_port = regInfo.HttpPort; region_server_uri = regInfo.ServerURI; region_external_hostname = regInfo.ExternalHostName; Uri uri = new Uri(region_server_uri); region_port = (uint)uri.Port; - - if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) - region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, - regInfo.MasterAvatarLastName); } public string this[string idx] -- cgit v1.1