aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDr Scofield2008-10-23 11:14:25 +0000
committerDr Scofield2008-10-23 11:14:25 +0000
commitdc7e3ddc3e5a622ae86670830530aa4a2206e762 (patch)
tree4dcdb800aca81b0b591969b73ccb403814b7c808 /OpenSim
parentremoving unused method from ConciergeModule. adding attendee list (diff)
downloadopensim-SC_OLD-dc7e3ddc3e5a622ae86670830530aa4a2206e762.zip
opensim-SC_OLD-dc7e3ddc3e5a622ae86670830530aa4a2206e762.tar.gz
opensim-SC_OLD-dc7e3ddc3e5a622ae86670830530aa4a2206e762.tar.bz2
opensim-SC_OLD-dc7e3ddc3e5a622ae86670830530aa4a2206e762.tar.xz
fix: recent patch to XmlRpcCreateRegionMethod introduced master avatar
UUID parameter without checking for it at the method entry. this patch adds logic to obtain the master UUID via the user profile service, and, if the master avatar does not exist, will create the user. in any case the UUID is then the one supplied by the user profile service.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs28
1 files changed, 23 insertions, 5 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index d7ca679..f29a62f 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -441,12 +441,30 @@ namespace OpenSim.ApplicationPlugins.RemoteController
441 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); 441 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
442 442
443 443
444 region.ExternalHostName = (string) requestData["external_address"]; 444 region.ExternalHostName = (string)requestData["external_address"];
445 445
446 region.MasterAvatarFirstName = (string) requestData["region_master_first"]; 446 string masterFirst = (string)requestData["region_master_first"];
447 region.MasterAvatarLastName = (string) requestData["region_master_last"]; 447 string masterLast = (string)requestData["region_master_last"];
448 region.MasterAvatarSandboxPassword = (string) requestData["region_master_password"]; 448 string masterPassword = (string)requestData["region_master_password"];
449 region.MasterAvatarAssignedUUID = new UUID(requestData["region_master_uuid"].ToString()); 449
450 UUID userID = UUID.Zero;
451 UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(masterFirst, masterLast);
452 if (null == userProfile)
453 {
454 m_log.InfoFormat("master avatar does not exist, creating it");
455 userID = m_app.CreateUser(masterFirst, masterLast, masterPassword, region.RegionLocX, region.RegionLocY);
456 if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}",
457 masterFirst, masterLast));
458 }
459 else
460 {
461 userID = userProfile.ID;
462 }
463
464 region.MasterAvatarFirstName = masterFirst;
465 region.MasterAvatarLastName = masterLast;
466 region.MasterAvatarSandboxPassword = masterPassword;
467 region.MasterAvatarAssignedUUID = userID;
450 468
451 bool persist = Convert.ToBoolean((string)requestData["persist"]); 469 bool persist = Convert.ToBoolean((string)requestData["persist"]);
452 if (persist) 470 if (persist)