diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins')
3 files changed, 3 insertions, 54 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index eda2934..85a3044 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -584,45 +584,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
584 | { | 584 | { |
585 | // ok, client wants us to use an explicit UUID | 585 | // ok, client wants us to use an explicit UUID |
586 | // regardless of what the avatar name provided | 586 | // regardless of what the avatar name provided |
587 | userID = new UUID((string) requestData["region_master_uuid"]); | 587 | userID = new UUID((string) requestData["estate_owner_uuid"]); |
588 | } | 588 | } |
589 | else | ||
590 | { | ||
591 | if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar | ||
592 | { | ||
593 | // no client supplied UUID: look it up... | ||
594 | UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; | ||
595 | UserAccount account = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, masterFirst, masterLast); | ||
596 | if (null == account) | ||
597 | { | ||
598 | m_log.InfoFormat("master avatar does not exist, creating it"); | ||
599 | // ...or create new user | ||
600 | |||
601 | account = new UserAccount(scopeID, masterFirst, masterLast, ""); | ||
602 | bool success = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.StoreUserAccount(account); | ||
603 | if (success) | ||
604 | { | ||
605 | GridRegion home = m_app.SceneManager.CurrentOrFirstScene.GridService.GetRegionByPosition(scopeID, | ||
606 | (int)(region.RegionLocX * Constants.RegionSize), (int)(region.RegionLocY * Constants.RegionSize)); | ||
607 | |||
608 | m_app.SceneManager.CurrentOrFirstScene.PresenceService.SetHomeLocation(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); | ||
609 | } | ||
610 | else | ||
611 | throw new Exception(String.Format("failed to create new user {0} {1}", | ||
612 | masterFirst, masterLast)); | ||
613 | |||
614 | } | ||
615 | else | ||
616 | { | ||
617 | userID = account.PrincipalID; | ||
618 | } | ||
619 | } | ||
620 | } | ||
621 | |||
622 | region.MasterAvatarFirstName = masterFirst; | ||
623 | region.MasterAvatarLastName = masterLast; | ||
624 | region.MasterAvatarSandboxPassword = masterPassword; | ||
625 | region.MasterAvatarAssignedUUID = userID; | ||
626 | 589 | ||
627 | bool persist = Convert.ToBoolean((string) requestData["persist"]); | 590 | bool persist = Convert.ToBoolean((string) requestData["persist"]); |
628 | if (persist) | 591 | if (persist) |
@@ -667,6 +630,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
667 | // If an access specification was provided, use it. | 630 | // If an access specification was provided, use it. |
668 | // Otherwise accept the default. | 631 | // Otherwise accept the default. |
669 | newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess); | 632 | newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess); |
633 | newscene.RegionInfo.EstateSettings.EstateOwner = userID; | ||
670 | if (persist) | 634 | if (persist) |
671 | newscene.RegionInfo.EstateSettings.Save(); | 635 | newscene.RegionInfo.EstateSettings.Save(); |
672 | 636 | ||
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 | |||
113 | rxw.WriteString(s.RegionInfo.ExternalHostName); | 113 | rxw.WriteString(s.RegionInfo.ExternalHostName); |
114 | rxw.WriteEndAttribute(); | 114 | rxw.WriteEndAttribute(); |
115 | 115 | ||
116 | rxw.WriteStartAttribute(String.Empty, "master_name", String.Empty); | ||
117 | rxw.WriteString(String.Format("{0} {1}", s.RegionInfo.MasterAvatarFirstName, s.RegionInfo.MasterAvatarLastName)); | ||
118 | rxw.WriteEndAttribute(); | ||
119 | |||
120 | rxw.WriteStartAttribute(String.Empty, "master_uuid", String.Empty); | ||
121 | rxw.WriteString(s.RegionInfo.MasterAvatarAssignedUUID.ToString()); | ||
122 | rxw.WriteEndAttribute(); | ||
123 | |||
124 | rxw.WriteStartAttribute(String.Empty, "ip", String.Empty); | 116 | rxw.WriteStartAttribute(String.Empty, "ip", String.Empty); |
125 | rxw.WriteString(s.RegionInfo.InternalEndPoint.ToString()); | 117 | rxw.WriteString(s.RegionInfo.InternalEndPoint.ToString()); |
126 | rxw.WriteEndAttribute(); | 118 | 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 | |||
56 | region_id = regInfo.RegionID.ToString(); | 56 | region_id = regInfo.RegionID.ToString(); |
57 | region_x = regInfo.RegionLocX; | 57 | region_x = regInfo.RegionLocX; |
58 | region_y = regInfo.RegionLocY; | 58 | region_y = regInfo.RegionLocY; |
59 | if (regInfo.EstateSettings.EstateOwner != UUID.Zero) | 59 | region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); |
60 | region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); | ||
61 | else | ||
62 | region_owner_id = regInfo.MasterAvatarAssignedUUID.ToString(); | ||
63 | region_http_port = regInfo.HttpPort; | 60 | region_http_port = regInfo.HttpPort; |
64 | region_server_uri = regInfo.ServerURI; | 61 | region_server_uri = regInfo.ServerURI; |
65 | region_external_hostname = regInfo.ExternalHostName; | 62 | region_external_hostname = regInfo.ExternalHostName; |
66 | 63 | ||
67 | Uri uri = new Uri(region_server_uri); | 64 | Uri uri = new Uri(region_server_uri); |
68 | region_port = (uint)uri.Port; | 65 | region_port = (uint)uri.Port; |
69 | |||
70 | if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) | ||
71 | region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, | ||
72 | regInfo.MasterAvatarLastName); | ||
73 | } | 66 | } |
74 | 67 | ||
75 | public string this[string idx] | 68 | public string this[string idx] |