aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorOren Hurvitz2015-08-07 11:34:52 +0300
committerOren Hurvitz2015-08-07 11:34:52 +0300
commit2153a01cc7eb8667fa0c9fc76a36b178566bf444 (patch)
tree1b527915181f2a2db53c0f8760c309ffb45c036a /OpenSim/Framework/Util.cs
parentmax-agent-groups support (diff)
downloadopensim-SC_OLD-2153a01cc7eb8667fa0c9fc76a36b178566bf444.zip
opensim-SC_OLD-2153a01cc7eb8667fa0c9fc76a36b178566bf444.tar.gz
opensim-SC_OLD-2153a01cc7eb8667fa0c9fc76a36b178566bf444.tar.bz2
opensim-SC_OLD-2153a01cc7eb8667fa0c9fc76a36b178566bf444.tar.xz
Have osAvatarName2Key check the cache first, even for foreign users
Another change: removed the second call to userManager.AddUser(). UserManagementModule won't modify an existing record.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Util.cs25
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 4e75a5c..875f4ad 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -2744,7 +2744,9 @@ namespace OpenSim.Framework
2744 #endregion 2744 #endregion
2745 2745
2746 #region Universal User Identifiers 2746 #region Universal User Identifiers
2747 /// <summary> 2747
2748 /// <summary>
2749 /// Attempts to parse a UUI into its components: UUID, name and URL.
2748 /// </summary> 2750 /// </summary>
2749 /// <param name="value">uuid[;endpoint[;first last[;secret]]]</param> 2751 /// <param name="value">uuid[;endpoint[;first last[;secret]]]</param>
2750 /// <param name="uuid">the uuid part</param> 2752 /// <param name="uuid">the uuid part</param>
@@ -2780,6 +2782,27 @@ namespace OpenSim.Framework
2780 } 2782 }
2781 2783
2782 /// <summary> 2784 /// <summary>
2785 /// For foreign avatars, extracts their original name and Server URL from their First Name and Last Name.
2786 /// </summary>
2787 public static bool ParseForeignAvatarName(string firstname, string lastname,
2788 out string realFirstName, out string realLastName, out string serverURI)
2789 {
2790 realFirstName = realLastName = serverURI = string.Empty;
2791
2792 if (!lastname.Contains("@"))
2793 return false;
2794
2795 if (!firstname.Contains("."))
2796 return false;
2797
2798 realFirstName = firstname.Split('.')[0];
2799 realLastName = firstname.Split('.')[1];
2800 serverURI = new Uri("http://" + lastname.Replace("@", "")).ToString();
2801
2802 return true;
2803 }
2804
2805 /// <summary>
2783 /// Produces a universal (HG) system-facing identifier given the information 2806 /// Produces a universal (HG) system-facing identifier given the information
2784 /// </summary> 2807 /// </summary>
2785 /// <param name="acircuit"></param> 2808 /// <param name="acircuit"></param>