diff options
Merge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 86c0ac8..535712e 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -844,21 +844,30 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
844 | } | 844 | } |
845 | 845 | ||
846 | // Create a new estate with the name provided | 846 | // Create a new estate with the name provided |
847 | region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(region.RegionID, true); | 847 | region.EstateSettings = m_application.EstateDataService.CreateNewEstate(); |
848 | 848 | ||
849 | region.EstateSettings.EstateName = (string) requestData["estate_name"]; | 849 | region.EstateSettings.EstateName = (string) requestData["estate_name"]; |
850 | region.EstateSettings.EstateOwner = userID; | 850 | region.EstateSettings.EstateOwner = userID; |
851 | // Persistence does not seem to effect the need to save a new estate | 851 | // Persistence does not seem to effect the need to save a new estate |
852 | region.EstateSettings.Save(); | 852 | region.EstateSettings.Save(); |
853 | |||
854 | if (!m_application.EstateDataService.LinkRegion(region.RegionID, (int) region.EstateSettings.EstateID)) | ||
855 | throw new Exception("Failed to join estate."); | ||
853 | } | 856 | } |
854 | else | 857 | else |
855 | { | 858 | { |
856 | int estateID = estateIDs[0]; | 859 | int estateID = estateIDs[0]; |
857 | 860 | ||
858 | region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(estateID); | 861 | region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(region.RegionID, false); |
859 | 862 | ||
860 | if (!m_application.EstateDataService.LinkRegion(region.RegionID, estateID)) | 863 | if (region.EstateSettings.EstateID != estateID) |
861 | throw new Exception("Failed to join estate."); | 864 | { |
865 | // The region is already part of an estate, but not the one we want. | ||
866 | region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(estateID); | ||
867 | |||
868 | if (!m_application.EstateDataService.LinkRegion(region.RegionID, estateID)) | ||
869 | throw new Exception("Failed to join estate."); | ||
870 | } | ||
862 | } | 871 | } |
863 | 872 | ||
864 | // Create the region and perform any initial initialization | 873 | // Create the region and perform any initial initialization |
@@ -2434,10 +2443,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2434 | /// <description>UUID of the region</description></item> | 2443 | /// <description>UUID of the region</description></item> |
2435 | /// <item><term>region_name</term> | 2444 | /// <item><term>region_name</term> |
2436 | /// <description>region name</description></item> | 2445 | /// <description>region name</description></item> |
2437 | /// <item><term>profile</term> | 2446 | /// <item><term>profile</term> |
2438 | /// <description>profile url</description></item> | 2447 | /// <description>profile url</description></item> |
2439 | /// <item><term>noassets</term> | 2448 | /// <item><term>noassets</term> |
2440 | /// <description>true if no assets should be saved</description></item> | 2449 | /// <description>true if no assets should be saved</description></item> |
2450 | /// <item><term>perm</term> | ||
2451 | /// <description>C and/or T</description></item> | ||
2441 | /// </list> | 2452 | /// </list> |
2442 | /// | 2453 | /// |
2443 | /// <code>region_uuid</code> takes precedence over | 2454 | /// <code>region_uuid</code> takes precedence over |
@@ -2512,6 +2523,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2512 | options["noassets"] = (string)requestData["noassets"] ; | 2523 | options["noassets"] = (string)requestData["noassets"] ; |
2513 | } | 2524 | } |
2514 | 2525 | ||
2526 | if (requestData.Contains("perm")) | ||
2527 | { | ||
2528 | options["checkPermissions"] = (string)requestData["perm"]; | ||
2529 | } | ||
2530 | |||
2515 | IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); | 2531 | IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); |
2516 | 2532 | ||
2517 | if (archiver != null) | 2533 | if (archiver != null) |