aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-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)