diff options
author | Justin Clarke Casey | 2009-05-04 16:15:30 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-05-04 16:15:30 +0000 |
commit | a61cbab799886e43749bc4d0803e579fec000f4c (patch) | |
tree | be4e32c991268d54c7d6b2d70edd49ac9c816265 /OpenSim/Framework/Communications | |
parent | * minor: remove some mono compiler warnings, minor cleanup (diff) | |
download | opensim-SC_OLD-a61cbab799886e43749bc4d0803e579fec000f4c.zip opensim-SC_OLD-a61cbab799886e43749bc4d0803e579fec000f4c.tar.gz opensim-SC_OLD-a61cbab799886e43749bc4d0803e579fec000f4c.tar.bz2 opensim-SC_OLD-a61cbab799886e43749bc4d0803e579fec000f4c.tar.xz |
* Insert profile references for creators for items saved into iars
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/OspResolver.cs | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/OspResolver.cs b/OpenSim/Framework/Communications/OspResolver.cs index 924a4a9..073abf8 100644 --- a/OpenSim/Framework/Communications/OspResolver.cs +++ b/OpenSim/Framework/Communications/OspResolver.cs | |||
@@ -50,7 +50,22 @@ namespace OpenSim.Framework.Communications | |||
50 | public const string OSPA_PAIR_SEPARATOR = "="; | 50 | public const string OSPA_PAIR_SEPARATOR = "="; |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Make an OSPA given an avatar name | 53 | /// Make an OSPA given a user UUID |
54 | /// </summary> | ||
55 | /// <param name="userId"></param> | ||
56 | /// <param name="commsManager"></param> | ||
57 | /// <returns>The OSPA. Null if a user with the given UUID could not be found.</returns> | ||
58 | public static string MakeOspa(UUID userId, CommunicationsManager commsManager) | ||
59 | { | ||
60 | CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); | ||
61 | if (userInfo != null) | ||
62 | return MakeOspa(userInfo.UserProfile.FirstName, userInfo.UserProfile.SurName); | ||
63 | |||
64 | return null; | ||
65 | } | ||
66 | |||
67 | /// <summary> | ||
68 | /// Make an OSPA given a user name | ||
54 | /// </summary> | 69 | /// </summary> |
55 | /// <param name="name"></param> | 70 | /// <param name="name"></param> |
56 | /// <returns></returns> | 71 | /// <returns></returns> |
@@ -58,7 +73,7 @@ namespace OpenSim.Framework.Communications | |||
58 | { | 73 | { |
59 | return | 74 | return |
60 | OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName; | 75 | OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName; |
61 | } | 76 | } |
62 | 77 | ||
63 | /// <summary> | 78 | /// <summary> |
64 | /// Resolve an osp string into the most suitable internal OpenSim identifier. | 79 | /// Resolve an osp string into the most suitable internal OpenSim identifier. |
@@ -74,7 +89,7 @@ namespace OpenSim.Framework.Communications | |||
74 | /// return that same string. If the input string was ospi data but no valid profile information has been found, | 89 | /// return that same string. If the input string was ospi data but no valid profile information has been found, |
75 | /// then returns null. | 90 | /// then returns null. |
76 | /// </returns> | 91 | /// </returns> |
77 | public static string Resolve(string ospa, CommunicationsManager commsManager) | 92 | public static string ResolveOspa(string ospa, CommunicationsManager commsManager) |
78 | { | 93 | { |
79 | m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); | 94 | m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); |
80 | 95 | ||