aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
authorMelanie2010-01-10 22:41:42 +0000
committerMelanie2010-01-10 22:41:42 +0000
commit3c90d834eac382af5edf091e83aea1ffcce91792 (patch)
tree60662b0f13fab4e0d7a7ab93533e5e66edbecf68 /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
parent* Last reference to CommsManager.UserProfileCacheService removed (diff)
downloadopensim-SC_OLD-3c90d834eac382af5edf091e83aea1ffcce91792.zip
opensim-SC_OLD-3c90d834eac382af5edf091e83aea1ffcce91792.tar.gz
opensim-SC_OLD-3c90d834eac382af5edf091e83aea1ffcce91792.tar.bz2
opensim-SC_OLD-3c90d834eac382af5edf091e83aea1ffcce91792.tar.xz
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.
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs40
1 files changed, 2 insertions, 38 deletions
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
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