Merge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/opensim into presence-refactor

slimupdates
Diva Canto 2010-01-10 15:35:15 -08:00
commit c0642bf7e0
19 changed files with 21 additions and 271 deletions

View File

@ -584,45 +584,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
// ok, client wants us to use an explicit UUID // ok, client wants us to use an explicit UUID
// regardless of what the avatar name provided // regardless of what the avatar name provided
userID = new UUID((string) requestData["region_master_uuid"]); userID = new UUID((string) requestData["estate_owner_uuid"]);
} }
else
{
if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar
{
// no client supplied UUID: look it up...
UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID;
UserAccount account = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, masterFirst, masterLast);
if (null == account)
{
m_log.InfoFormat("master avatar does not exist, creating it");
// ...or create new user
account = new UserAccount(scopeID, masterFirst, masterLast, "");
bool success = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.StoreUserAccount(account);
if (success)
{
GridRegion home = m_app.SceneManager.CurrentOrFirstScene.GridService.GetRegionByPosition(scopeID,
(int)(region.RegionLocX * Constants.RegionSize), (int)(region.RegionLocY * Constants.RegionSize));
m_app.SceneManager.CurrentOrFirstScene.PresenceService.SetHomeLocation(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
}
else
throw new Exception(String.Format("failed to create new user {0} {1}",
masterFirst, masterLast));
}
else
{
userID = account.PrincipalID;
}
}
}
region.MasterAvatarFirstName = masterFirst;
region.MasterAvatarLastName = masterLast;
region.MasterAvatarSandboxPassword = masterPassword;
region.MasterAvatarAssignedUUID = userID;
bool persist = Convert.ToBoolean((string) requestData["persist"]); bool persist = Convert.ToBoolean((string) requestData["persist"]);
if (persist) if (persist)
@ -667,6 +630,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// If an access specification was provided, use it. // If an access specification was provided, use it.
// Otherwise accept the default. // Otherwise accept the default.
newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess); newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess);
newscene.RegionInfo.EstateSettings.EstateOwner = userID;
if (persist) if (persist)
newscene.RegionInfo.EstateSettings.Save(); newscene.RegionInfo.EstateSettings.Save();

View File

@ -113,14 +113,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
rxw.WriteString(s.RegionInfo.ExternalHostName); rxw.WriteString(s.RegionInfo.ExternalHostName);
rxw.WriteEndAttribute(); rxw.WriteEndAttribute();
rxw.WriteStartAttribute(String.Empty, "master_name", String.Empty);
rxw.WriteString(String.Format("{0} {1}", s.RegionInfo.MasterAvatarFirstName, s.RegionInfo.MasterAvatarLastName));
rxw.WriteEndAttribute();
rxw.WriteStartAttribute(String.Empty, "master_uuid", String.Empty);
rxw.WriteString(s.RegionInfo.MasterAvatarAssignedUUID.ToString());
rxw.WriteEndAttribute();
rxw.WriteStartAttribute(String.Empty, "ip", String.Empty); rxw.WriteStartAttribute(String.Empty, "ip", String.Empty);
rxw.WriteString(s.RegionInfo.InternalEndPoint.ToString()); rxw.WriteString(s.RegionInfo.InternalEndPoint.ToString());
rxw.WriteEndAttribute(); rxw.WriteEndAttribute();

View File

@ -56,20 +56,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
region_id = regInfo.RegionID.ToString(); region_id = regInfo.RegionID.ToString();
region_x = regInfo.RegionLocX; region_x = regInfo.RegionLocX;
region_y = regInfo.RegionLocY; region_y = regInfo.RegionLocY;
if (regInfo.EstateSettings.EstateOwner != UUID.Zero) region_owner_id = regInfo.EstateSettings.EstateOwner.ToString();
region_owner_id = regInfo.EstateSettings.EstateOwner.ToString();
else
region_owner_id = regInfo.MasterAvatarAssignedUUID.ToString();
region_http_port = regInfo.HttpPort; region_http_port = regInfo.HttpPort;
region_server_uri = regInfo.ServerURI; region_server_uri = regInfo.ServerURI;
region_external_hostname = regInfo.ExternalHostName; region_external_hostname = regInfo.ExternalHostName;
Uri uri = new Uri(region_server_uri); Uri uri = new Uri(region_server_uri);
region_port = (uint)uri.Port; region_port = (uint)uri.Port;
if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName))
region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName,
regInfo.MasterAvatarLastName);
} }
public string this[string idx] public string this[string idx]

View File

@ -427,7 +427,7 @@ namespace OpenSim.Client.MXP.ClientStack
pe.ObjectFragment.ObjectIndex = (uint)(m_scene.RegionInfo.RegionSettings.RegionUUID.GetHashCode() + ((long)int.MaxValue) / 2); pe.ObjectFragment.ObjectIndex = (uint)(m_scene.RegionInfo.RegionSettings.RegionUUID.GetHashCode() + ((long)int.MaxValue) / 2);
pe.ObjectFragment.ParentObjectId = UUID.Zero.Guid; pe.ObjectFragment.ParentObjectId = UUID.Zero.Guid;
pe.ObjectFragment.ObjectName = "Terrain of " + m_scene.RegionInfo.RegionName; pe.ObjectFragment.ObjectName = "Terrain of " + m_scene.RegionInfo.RegionName;
pe.ObjectFragment.OwnerId = m_scene.RegionInfo.MasterAvatarAssignedUUID.Guid; pe.ObjectFragment.OwnerId = m_scene.RegionInfo.EstateSettings.EstateOwner;
pe.ObjectFragment.TypeId = Guid.Empty; pe.ObjectFragment.TypeId = Guid.Empty;
pe.ObjectFragment.TypeName = "Terrain"; pe.ObjectFragment.TypeName = "Terrain";
pe.ObjectFragment.Acceleration = new MsdVector3f(); pe.ObjectFragment.Acceleration = new MsdVector3f();

View File

@ -68,10 +68,7 @@ namespace OpenSim.Framework.Communications.Clients
GridParams["region_secret"] = regionInfo.regionSecret; GridParams["region_secret"] = regionInfo.regionSecret;
GridParams["major_interface_version"] = VersionInfo.MajorInterfaceVersion.ToString(); GridParams["major_interface_version"] = VersionInfo.MajorInterfaceVersion.ToString();
if (regionInfo.MasterAvatarAssignedUUID != UUID.Zero) GridParams["master_avatar_uuid"] = regionInfo.EstateSettings.EstateOwner.ToString();
GridParams["master_avatar_uuid"] = regionInfo.MasterAvatarAssignedUUID.ToString();
else
GridParams["master_avatar_uuid"] = regionInfo.EstateSettings.EstateOwner.ToString();
// Package into an XMLRPC Request // Package into an XMLRPC Request
ArrayList SendParams = new ArrayList(); ArrayList SendParams = new ArrayList();

View File

@ -54,10 +54,6 @@ namespace OpenSim.Framework
private RegionSettings m_regionSettings; private RegionSettings m_regionSettings;
// private IConfigSource m_configSource = null; // private IConfigSource m_configSource = null;
public UUID MasterAvatarAssignedUUID = UUID.Zero;
public string MasterAvatarFirstName = String.Empty;
public string MasterAvatarLastName = String.Empty;
public string MasterAvatarSandboxPassword = String.Empty;
public UUID originRegionID = UUID.Zero; public UUID originRegionID = UUID.Zero;
public string proxyUrl = ""; public string proxyUrl = "";
public int ProxyOffset = 0; public int ProxyOffset = 0;
@ -488,40 +484,6 @@ namespace OpenSim.Framework
m_externalHostName = externalName; m_externalHostName = externalName;
// Master avatar cruft
//
string masterAvatarUUID;
if (!creatingNew)
{
masterAvatarUUID = config.GetString("MasterAvatarUUID", UUID.Zero.ToString());
MasterAvatarFirstName = config.GetString("MasterAvatarFirstName", String.Empty);
MasterAvatarLastName = config.GetString("MasterAvatarLastName", String.Empty);
MasterAvatarSandboxPassword = config.GetString("MasterAvatarSandboxPassword", String.Empty);
}
else
{
masterAvatarUUID = MainConsole.Instance.CmdPrompt("Master Avatar UUID", UUID.Zero.ToString());
if (masterAvatarUUID != UUID.Zero.ToString())
{
config.Set("MasterAvatarUUID", masterAvatarUUID);
}
else
{
MasterAvatarFirstName = MainConsole.Instance.CmdPrompt("Master Avatar first name (enter for no master avatar)", String.Empty);
if (MasterAvatarFirstName != String.Empty)
{
MasterAvatarLastName = MainConsole.Instance.CmdPrompt("Master Avatar last name", String.Empty);
MasterAvatarSandboxPassword = MainConsole.Instance.CmdPrompt("Master Avatar sandbox password", String.Empty);
config.Set("MasterAvatarFirstName", MasterAvatarFirstName);
config.Set("MasterAvatarLastName", MasterAvatarLastName);
config.Set("MasterAvatarSandboxPassword", MasterAvatarSandboxPassword);
}
}
}
MasterAvatarAssignedUUID = new UUID(masterAvatarUUID);
m_regionType = config.GetString("RegionType", String.Empty); m_regionType = config.GetString("RegionType", String.Empty);
// Prim stuff // Prim stuff
@ -564,20 +526,6 @@ namespace OpenSim.Framework
config.Set("ExternalHostName", m_externalHostName); config.Set("ExternalHostName", m_externalHostName);
if (MasterAvatarAssignedUUID != UUID.Zero)
{
config.Set("MasterAvatarUUID", MasterAvatarAssignedUUID.ToString());
}
else if (MasterAvatarFirstName != String.Empty && MasterAvatarLastName != String.Empty)
{
config.Set("MasterAvatarFirstName", MasterAvatarFirstName);
config.Set("MasterAvatarLastName", MasterAvatarLastName);
}
if (MasterAvatarSandboxPassword != String.Empty)
{
config.Set("MasterAvatarSandboxPassword", MasterAvatarSandboxPassword);
}
if (m_nonphysPrimMax != 0) if (m_nonphysPrimMax != 0)
config.Set("NonphysicalPrimMax", m_nonphysPrimMax); config.Set("NonphysicalPrimMax", m_nonphysPrimMax);
if (m_physPrimMax != 0) if (m_physPrimMax != 0)
@ -651,17 +599,6 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("external_host_name", configMember.addConfigurationOption("external_host_name",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"External Host Name", m_externalHostName, true); "External Host Name", m_externalHostName, true);
configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
"Master Avatar UUID", MasterAvatarAssignedUUID.ToString(), true);
configMember.addConfigurationOption("master_avatar_first",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"First Name of Master Avatar", MasterAvatarFirstName, true);
configMember.addConfigurationOption("master_avatar_last",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Last Name of Master Avatar", MasterAvatarLastName, true);
configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"(Sandbox Mode Only)Password for Master Avatar account",
MasterAvatarSandboxPassword, true);
configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID, configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
"Last Map UUID", lastMapUUID.ToString(), true); "Last Map UUID", lastMapUUID.ToString(), true);
configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
@ -711,22 +648,6 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("external_host_name", configMember.addConfigurationOption("external_host_name",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"External Host Name", "127.0.0.1", false); "External Host Name", "127.0.0.1", false);
configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
"Master Avatar UUID", UUID.Zero.ToString(), true);
configMember.addConfigurationOption("master_avatar_first",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"First Name of Master Avatar", "Test", false,
(ConfigurationOption.ConfigurationOptionShouldBeAsked)
shouldMasterAvatarDetailsBeAsked);
configMember.addConfigurationOption("master_avatar_last",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Last Name of Master Avatar", "User", false,
(ConfigurationOption.ConfigurationOptionShouldBeAsked)
shouldMasterAvatarDetailsBeAsked);
configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"(Sandbox Mode Only)Password for Master Avatar account", "test", false,
(ConfigurationOption.ConfigurationOptionShouldBeAsked)
shouldMasterAvatarDetailsBeAsked);
configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID, configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
"Last Map UUID", lastMapUUID.ToString(), true); "Last Map UUID", lastMapUUID.ToString(), true);
@ -752,11 +673,6 @@ namespace OpenSim.Framework
"Region Type", String.Empty, true); "Region Type", String.Empty, true);
} }
public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
{
return MasterAvatarAssignedUUID == UUID.Zero;
}
public bool handleIncomingConfiguration(string configuration_key, object configuration_result) public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
{ {
switch (configuration_key) switch (configuration_key)
@ -797,18 +713,6 @@ namespace OpenSim.Framework
m_externalHostName = Util.GetLocalHost().ToString(); m_externalHostName = Util.GetLocalHost().ToString();
} }
break; break;
case "master_avatar_uuid":
MasterAvatarAssignedUUID = (UUID) configuration_result;
break;
case "master_avatar_first":
MasterAvatarFirstName = (string) configuration_result;
break;
case "master_avatar_last":
MasterAvatarLastName = (string) configuration_result;
break;
case "master_avatar_pass":
MasterAvatarSandboxPassword = (string)configuration_result;
break;
case "lastmap_uuid": case "lastmap_uuid":
lastMapUUID = (UUID)configuration_result; lastMapUUID = (UUID)configuration_result;
break; break;

View File

@ -586,35 +586,6 @@ namespace OpenSim
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
// TODO: Remove this cruft once MasterAvatar is fully deprecated
//Master Avatar Setup
UserProfileData masterAvatar;
if (scene.RegionInfo.MasterAvatarAssignedUUID == UUID.Zero)
{
masterAvatar =
m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName,
scene.RegionInfo.MasterAvatarLastName,
scene.RegionInfo.MasterAvatarSandboxPassword);
}
else
{
masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID);
scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName;
scene.RegionInfo.MasterAvatarLastName = masterAvatar.SurName;
}
if (masterAvatar == null)
{
m_log.Info("[PARCEL]: No master avatar found, using null.");
scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero;
}
else
{
m_log.InfoFormat("[PARCEL]: Found master avatar {0} {1} [" + masterAvatar.ID.ToString() + "]",
scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName);
scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID;
}
return scene; return scene;
} }

View File

@ -4030,10 +4030,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
edata.CovenantID = covenant; edata.CovenantID = covenant;
edata.CovenantTimestamp = 0; edata.CovenantTimestamp = 0;
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
edata.EstateName = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateName); edata.EstateName = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateName);
einfopack.Data = edata; einfopack.Data = edata;
OutPacket(einfopack, ThrottleOutPacketType.Task); OutPacket(einfopack, ThrottleOutPacketType.Task);
@ -4054,8 +4051,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//Sending Estate Settings //Sending Estate Settings
returnblock[0].Parameter = Utils.StringToBytes(estateName); returnblock[0].Parameter = Utils.StringToBytes(estateName);
// TODO: remove this cruft once MasterAvatar is fully deprecated
//
returnblock[1].Parameter = Utils.StringToBytes(estateOwner.ToString()); returnblock[1].Parameter = Utils.StringToBytes(estateOwner.ToString());
returnblock[2].Parameter = Utils.StringToBytes(estateID.ToString()); returnblock[2].Parameter = Utils.StringToBytes(estateID.ToString());

View File

@ -182,10 +182,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid // Try to retain the original creator/owner/lastowner if their uuid is present on this grid
// otherwise, use the master avatar uuid instead // otherwise, use the master avatar uuid instead
UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
// Reload serialized parcels // Reload serialized parcels
m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count); m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count);
@ -194,7 +190,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{ {
LandData parcel = LandDataSerializer.Deserialize(serialisedParcel); LandData parcel = LandDataSerializer.Deserialize(serialisedParcel);
if (!ResolveUserUuid(parcel.OwnerID)) if (!ResolveUserUuid(parcel.OwnerID))
parcel.OwnerID = masterAvatarId; parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
landData.Add(parcel); landData.Add(parcel);
} }
m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData);
@ -233,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
foreach (SceneObjectPart part in sceneObject.Children.Values) foreach (SceneObjectPart part in sceneObject.Children.Values)
{ {
if (!ResolveUserUuid(part.CreatorID)) if (!ResolveUserUuid(part.CreatorID))
part.CreatorID = masterAvatarId; part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner;
if (!ResolveUserUuid(part.OwnerID)) if (!ResolveUserUuid(part.OwnerID))
part.OwnerID = masterAvatarId; part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
if (!ResolveUserUuid(part.LastOwnerID)) if (!ResolveUserUuid(part.LastOwnerID))
part.LastOwnerID = masterAvatarId; part.LastOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
// And zap any troublesome sit target information // And zap any troublesome sit target information
part.SitTargetOrientation = new Quaternion(0, 0, 0, 1); part.SitTargetOrientation = new Quaternion(0, 0, 0, 1);
@ -255,11 +251,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{ {
if (!ResolveUserUuid(kvp.Value.OwnerID)) if (!ResolveUserUuid(kvp.Value.OwnerID))
{ {
kvp.Value.OwnerID = masterAvatarId; kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
} }
if (!ResolveUserUuid(kvp.Value.CreatorID)) if (!ResolveUserUuid(kvp.Value.CreatorID))
{ {
kvp.Value.CreatorID = masterAvatarId; kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner;
} }
} }
} }

View File

@ -57,10 +57,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime) if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime)
sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800; sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800;
UUID estateOwner; UUID estateOwner;
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) estateOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
estateOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
estateOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
if (m_scene.Permissions.IsGod(remote_client.AgentId)) if (m_scene.Permissions.IsGod(remote_client.AgentId))
estateOwner = remote_client.AgentId; estateOwner = remote_client.AgentId;
@ -230,8 +227,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
if (user == m_scene.RegionInfo.EstateSettings.EstateOwner) if (user == m_scene.RegionInfo.EstateSettings.EstateOwner)
return; // never process EO return; // never process EO
if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID)
return; // never process owner
switch (estateAccessType) switch (estateAccessType)
{ {
@ -741,14 +736,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;
args.regionFlags = GetRegionFlags(); args.regionFlags = GetRegionFlags();
args.regionName = m_scene.RegionInfo.RegionName; args.regionName = m_scene.RegionInfo.RegionName;
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
// Fudge estate owner
//if (m_scene.Permissions.IsGod(remoteClient.AgentId))
// args.SimOwner = remoteClient.AgentId;
args.terrainBase0 = UUID.Zero; args.terrainBase0 = UUID.Zero;
args.terrainBase1 = UUID.Zero; args.terrainBase1 = UUID.Zero;
@ -1127,8 +1115,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
public bool IsManager(UUID avatarID) public bool IsManager(UUID avatarID)
{ {
if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID)
return true;
if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner) if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner)
return true; return true;

View File

@ -227,10 +227,7 @@ namespace OpenSim.Region.CoreModules.World.Land
ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);
fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
AddLandObject(fullSimParcel); AddLandObject(fullSimParcel);
} }
@ -1090,10 +1087,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (m_scene.Permissions.CanAbandonParcel(remote_client.AgentId, land)) if (m_scene.Permissions.CanAbandonParcel(remote_client.AgentId, land))
{ {
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
land.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
land.LandData.GroupID = UUID.Zero; land.LandData.GroupID = UUID.Zero;
land.LandData.IsGroupOwned = false; land.LandData.IsGroupOwned = false;
m_scene.ForEachClient(SendParcelOverlay); m_scene.ForEachClient(SendParcelOverlay);
@ -1114,10 +1108,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
if (m_scene.Permissions.CanReclaimParcel(remote_client.AgentId, land)) if (m_scene.Permissions.CanReclaimParcel(remote_client.AgentId, land))
{ {
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
land.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
else
land.LandData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
land.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); land.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
land.LandData.GroupID = UUID.Zero; land.LandData.GroupID = UUID.Zero;
land.LandData.IsGroupOwned = false; land.LandData.IsGroupOwned = false;

View File

@ -477,12 +477,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
{ {
if (user == UUID.Zero) return false; if (user == UUID.Zero) return false;
if (m_scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero)
{
if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user))
return true;
}
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
{ {
if (m_scene.RegionInfo.EstateSettings.EstateOwner == user) if (m_scene.RegionInfo.EstateSettings.EstateOwner == user)

View File

@ -56,9 +56,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
//Now in DataSnapshotProvider module form! //Now in DataSnapshotProvider module form!
XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", ""); XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", "");
UUID ownerid = m_scene.RegionInfo.MasterAvatarAssignedUUID; ownerid = m_scene.RegionInfo.EstateSettings.EstateOwner;
if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
ownerid = m_scene.RegionInfo.EstateSettings.EstateOwner;
UserAccount userInfo = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid); UserAccount userInfo = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid);
//TODO: Change to query userserver about the master avatar UUID ? //TODO: Change to query userserver about the master avatar UUID ?

View File

@ -101,12 +101,6 @@ namespace OpenSim.Region.Framework.Scenes
{ {
userlevel = 1; userlevel = 1;
} }
// TODO: remove this cruft once MasterAvatar is fully deprecated
//
if (m_regInfo.MasterAvatarAssignedUUID == AgentID)
{
userlevel = 2;
}
EventManager.TriggerOnNewInventoryItemUploadComplete(AgentID, item.AssetID, item.Name, userlevel); EventManager.TriggerOnNewInventoryItemUploadComplete(AgentID, item.AssetID, item.Name, userlevel);
} }
else else

View File

@ -57,8 +57,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
internal string Host = String.Empty; internal string Host = String.Empty;
internal string LocX = String.Empty; internal string LocX = String.Empty;
internal string LocY = String.Empty; internal string LocY = String.Empty;
internal string MA1 = String.Empty;
internal string MA2 = String.Empty;
internal string IDK = String.Empty; internal string IDK = String.Empty;
// System values - used only be the IRC classes themselves // System values - used only be the IRC classes themselves
@ -85,8 +83,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
Host = scene.RegionInfo.ExternalHostName; Host = scene.RegionInfo.ExternalHostName;
LocX = Convert.ToString(scene.RegionInfo.RegionLocX); LocX = Convert.ToString(scene.RegionInfo.RegionLocX);
LocY = Convert.ToString(scene.RegionInfo.RegionLocY); LocY = Convert.ToString(scene.RegionInfo.RegionLocY);
MA1 = scene.RegionInfo.MasterAvatarFirstName;
MA2 = scene.RegionInfo.MasterAvatarLastName;
IDK = Convert.ToString(_idk_++); IDK = Convert.ToString(_idk_++);
// OpenChannel conditionally establishes a connection to the // OpenChannel conditionally establishes a connection to the

View File

@ -212,8 +212,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
if (script.StartsWith("//MRM:C#")) if (script.StartsWith("//MRM:C#"))
{ {
if (m_config.GetBoolean("OwnerOnly", true)) if (m_config.GetBoolean("OwnerOnly", true))
if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.MasterAvatarAssignedUUID if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.EstateSettings.EstateOwner)
|| m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.MasterAvatarAssignedUUID) || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.EstateSettings.EstateOwner)
return; return;
script = ConvertMRMKeywords(script); script = ConvertMRMKeywords(script);
@ -280,7 +280,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host)
{ {
// UUID should be changed to object owner. // UUID should be changed to object owner.
UUID owner = m_scene.RegionInfo.MasterAvatarAssignedUUID; UUID owner = m_scene.RegionInfo.EstateSettings.EstateOwner)
SEUser securityUser = new SEUser(owner, "Name Unassigned"); SEUser securityUser = new SEUser(owner, "Name Unassigned");
SecurityCredential creds = new SecurityCredential(securityUser, m_scene); SecurityCredential creds = new SecurityCredential(securityUser, m_scene);

View File

@ -306,8 +306,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
m_log.InfoFormat("[TREES]: New tree planting for copse {0}", copsename); m_log.InfoFormat("[TREES]: New tree planting for copse {0}", copsename);
UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
if (uuid == UUID.Zero)
uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
foreach (Copse copse in m_copse) foreach (Copse copse in m_copse)
{ {
@ -760,8 +758,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range)
{ {
UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
if (uuid == UUID.Zero)
uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
CreateTree(uuid, copse, position); CreateTree(uuid, copse, position);
} }

View File

@ -204,12 +204,6 @@ namespace OpenSim.Services.Interfaces
Maturity = ConvertFrom.RegionSettings.Maturity; Maturity = ConvertFrom.RegionSettings.Maturity;
RegionSecret = ConvertFrom.regionSecret; RegionSecret = ConvertFrom.regionSecret;
EstateOwner = ConvertFrom.EstateSettings.EstateOwner; EstateOwner = ConvertFrom.EstateSettings.EstateOwner;
if (EstateOwner == UUID.Zero)
{
EstateOwner = ConvertFrom.MasterAvatarAssignedUUID;
ConvertFrom.EstateSettings.EstateOwner = EstateOwner;
ConvertFrom.EstateSettings.Save();
}
} }
public GridRegion(GridRegion ConvertFrom) public GridRegion(GridRegion ConvertFrom)

View File

@ -19,17 +19,6 @@ InternalPort = 9000
AllowAlternatePorts = False AllowAlternatePorts = False
ExternalHostName = "SYSTEMIP" ExternalHostName = "SYSTEMIP"
; *
; * Master avatar stuff. Set either a UUID (from OSGrid or your server)
; * OR a first and last name. Password is only needed for sandbox mode
; * The default assigns no master avatar
; *
MasterAvatarUUID = "00000000-0000-0000-0000-000000000000"
; MasterAvatarFirstName = ""
; MasterAvatarLastName = ""
; MasterAvatarSandboxPassword = ""
; * ; *
; * Prim data ; * Prim data
; * This allows limiting the sizes of prims and the region prim count ; * This allows limiting the sizes of prims and the region prim count