Merge branch 'master' into careminster-presence-refactor

This commit is contained in:
Melanie
2010-11-22 01:09:26 +00:00
31 changed files with 683 additions and 87 deletions

View File

@@ -445,6 +445,7 @@ namespace OpenSim.Region.Framework.Scenes
private DateTime m_expires;
private DateTime m_rezzed;
private bool m_createSelected = false;
private string m_creatorData = string.Empty;
public UUID CreatorID
{
@@ -458,6 +459,61 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public string CreatorData // = <profile url>;<name>
{
get { return m_creatorData; }
set { m_creatorData = value; }
}
/// <summary>
/// Used by the DB layer to retrieve / store the entire user identification.
/// The identification can either be a simple UUID or a string of the form
/// uuid[;profile_url[;name]]
/// </summary>
public string CreatorIdentification
{
get
{
if (m_creatorData != null && m_creatorData != string.Empty)
return _creatorID.ToString() + ';' + m_creatorData;
else
return _creatorID.ToString();
}
set
{
if ((value == null) || (value != null && value == string.Empty))
{
m_creatorData = string.Empty;
return;
}
if (!value.Contains(";")) // plain UUID
{
UUID uuid = UUID.Zero;
UUID.TryParse(value, out uuid);
_creatorID = uuid;
}
else // <uuid>[;<endpoint>[;name]]
{
string name = "Unknown User";
string[] parts = value.Split(';');
if (parts.Length >= 1)
{
UUID uuid = UUID.Zero;
UUID.TryParse(parts[0], out uuid);
_creatorID = uuid;
}
if (parts.Length >= 2)
m_creatorData = parts[1];
if (parts.Length >= 3)
name = parts[2];
m_creatorData += ';' + name;
}
}
}
/// <summary>
/// A relic from when we we thought that prims contained folder objects. In
/// reality, prim == folder