aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AgentCircuitData.cs1
-rw-r--r--OpenSim/Framework/AssetBase.cs6
-rw-r--r--OpenSim/Framework/AssetLandmark.cs3
-rw-r--r--OpenSim/Framework/IClientAPI.cs16
-rw-r--r--OpenSim/Framework/Util.cs63
5 files changed, 87 insertions, 2 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index dbd47d3..125910e 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -345,6 +345,7 @@ namespace OpenSim.Framework
345 } 345 }
346 } 346 }
347 } 347 }
348
348 } 349 }
349 350
350 351
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs
index 98fa846..8e24f91 100644
--- a/OpenSim/Framework/AssetBase.cs
+++ b/OpenSim/Framework/AssetBase.cs
@@ -223,6 +223,12 @@ namespace OpenSim.Framework
223 set { m_metadata.Temporary = value; } 223 set { m_metadata.Temporary = value; }
224 } 224 }
225 225
226 public string CreatorID
227 {
228 get { return m_metadata.CreatorID; }
229 set { m_metadata.CreatorID = value; }
230 }
231
226 public AssetFlags Flags 232 public AssetFlags Flags
227 { 233 {
228 get { return m_metadata.Flags; } 234 get { return m_metadata.Flags; }
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs
index f433235..103f756 100644
--- a/OpenSim/Framework/AssetLandmark.cs
+++ b/OpenSim/Framework/AssetLandmark.cs
@@ -35,6 +35,7 @@ namespace OpenSim.Framework
35 public Vector3 Position; 35 public Vector3 Position;
36 public ulong RegionHandle; 36 public ulong RegionHandle;
37 public UUID RegionID; 37 public UUID RegionID;
38 public string Gatekeeper = string.Empty;
38 public int Version; 39 public int Version;
39 40
40 public AssetLandmark(AssetBase a) 41 public AssetLandmark(AssetBase a)
@@ -51,6 +52,8 @@ namespace OpenSim.Framework
51 string[] parts = temp.Split('\n'); 52 string[] parts = temp.Split('\n');
52 int.TryParse(parts[0].Substring(17, 1), out Version); 53 int.TryParse(parts[0].Substring(17, 1), out Version);
53 UUID.TryParse(parts[1].Substring(10, 36), out RegionID); 54 UUID.TryParse(parts[1].Substring(10, 36), out RegionID);
55 if (parts.Length >= 5)
56 Gatekeeper = parts[4].Replace("gatekeeper ", "");
54 // The position is a vector with spaces as separators ("10.3 32.5 43"). 57 // The position is a vector with spaces as separators ("10.3 32.5 43").
55 // Parse each scalar separately to take into account the system's culture setting. 58 // Parse each scalar separately to take into account the system's culture setting.
56 string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' '); 59 string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' ');
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 3cf5f32..31a45e2 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Framework
83 IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags); 83 IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
84 84
85 public delegate void TeleportLandmarkRequest( 85 public delegate void TeleportLandmarkRequest(
86 IClientAPI remoteClient, UUID regionID, Vector3 position); 86 IClientAPI remoteClient, AssetLandmark lm);
87 87
88 public delegate void DisconnectUser(); 88 public delegate void DisconnectUser();
89 89
@@ -1165,7 +1165,19 @@ namespace OpenSim.Framework
1165 void SendAgentAlertMessage(string message, bool modal); 1165 void SendAgentAlertMessage(string message, bool modal);
1166 void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); 1166 void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
1167 1167
1168 void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, 1168 /// <summary>
1169 /// Open a dialog box on the client.
1170 /// </summary>
1171 /// <param name="objectname"></param>
1172 /// <param name="objectID"></param>
1173 /// <param name="ownerID">/param>
1174 /// <param name="ownerFirstName"></param>
1175 /// <param name="ownerLastName"></param>
1176 /// <param name="msg"></param>
1177 /// <param name="textureID"></param>
1178 /// <param name="ch"></param>
1179 /// <param name="buttonlabels"></param>
1180 void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
1169 string[] buttonlabels); 1181 string[] buttonlabels);
1170 1182
1171 bool AddMoney(int debit); 1183 bool AddMoney(int debit);
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 366a38f..5ace351 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1706,5 +1706,68 @@ namespace OpenSim.Framework
1706 return (T)Enum.Parse(typeof(T), value); ; 1706 return (T)Enum.Parse(typeof(T), value); ;
1707 } 1707 }
1708 #endregion 1708 #endregion
1709
1710 #region Universal User Identifiers
1711 /// <summary>
1712 /// </summary>
1713 /// <param name="value">uuid[;endpoint[;name]]</param>
1714 /// <param name="uuid"></param>
1715 /// <param name="url"></param>
1716 /// <param name="firstname"></param>
1717 /// <param name="lastname"></param>
1718 public static bool ParseUniversalUserIdentifier(string value, out UUID uuid, out string url, out string firstname, out string lastname, out string secret)
1719 {
1720 uuid = UUID.Zero; url = string.Empty; firstname = "Unknown"; lastname = "User"; secret = string.Empty;
1721
1722 string[] parts = value.Split(';');
1723 if (parts.Length >= 1)
1724 if (!UUID.TryParse(parts[0], out uuid))
1725 return false;
1726
1727 if (parts.Length >= 2)
1728 url = parts[1];
1729
1730 if (parts.Length >= 3)
1731 {
1732 string[] name = parts[2].Split();
1733 if (name.Length == 2)
1734 {
1735 firstname = name[0];
1736 lastname = name[1];
1737 }
1738 }
1739 if (parts.Length >= 4)
1740 secret = parts[3];
1741
1742 return true;
1743 }
1744
1745 /// <summary>
1746 ///
1747 /// </summary>
1748 /// <param name="acircuit"></param>
1749 /// <returns>uuid[;endpoint[;name]]</returns>
1750 public static string ProduceUserUniversalIdentifier(AgentCircuitData acircuit)
1751 {
1752 if (acircuit.ServiceURLs.ContainsKey("HomeURI"))
1753 {
1754 string agentsURI = acircuit.ServiceURLs["HomeURI"].ToString();
1755 if (!agentsURI.EndsWith("/"))
1756 agentsURI += "/";
1757
1758 // This is ugly, but there's no other way, given that the name is changed
1759 // in the agent circuit data for foreigners
1760 if (acircuit.lastname.Contains("@"))
1761 {
1762 string[] parts = acircuit.firstname.Split(new char[] { '.' });
1763 if (parts.Length == 2)
1764 return acircuit.AgentID.ToString() + ";" + agentsURI + ";" + parts[0] + " " + parts[1];
1765 }
1766 return acircuit.AgentID.ToString() + ";" + agentsURI + ";" + acircuit.firstname + " " + acircuit.lastname;
1767 }
1768 else
1769 return acircuit.AgentID.ToString();
1770 }
1771 #endregion
1709 } 1772 }
1710} 1773}