aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService/UserAgentService.cs
diff options
context:
space:
mode:
authorDiva Canto2011-05-26 10:04:48 -0700
committerDiva Canto2011-05-26 10:04:48 -0700
commit0c58a9e68074f3593920dc9f2356bbed96416497 (patch)
tree6bccb313c233ab6486195e8a3663cfa1d30c41b9 /OpenSim/Services/HypergridService/UserAgentService.cs
parentHG: Renamed, shuffled some interfaces around. Move them all to IHypergridServ... (diff)
downloadopensim-SC_OLD-0c58a9e68074f3593920dc9f2356bbed96416497.zip
opensim-SC_OLD-0c58a9e68074f3593920dc9f2356bbed96416497.tar.gz
opensim-SC_OLD-0c58a9e68074f3593920dc9f2356bbed96416497.tar.bz2
opensim-SC_OLD-0c58a9e68074f3593920dc9f2356bbed96416497.tar.xz
HG IM in grid mode working fairly well. Unknown target user references looked back in source user's User Agent service.
Diffstat (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs')
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 59ad043..387547e 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -485,6 +485,30 @@ namespace OpenSim.Services.HypergridService
485 485
486 return string.Empty; 486 return string.Empty;
487 } 487 }
488
489 public string GetUUI(UUID userID, UUID targetUserID)
490 {
491 // Let's see if it's a local user
492 UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, targetUserID);
493 if (account != null)
494 return targetUserID.ToString() + ";" + m_GridName + ";" + account.FirstName + " " + account.LastName ;
495
496 // Let's try the list of friends
497 FriendInfo[] friends = m_FriendsService.GetFriends(userID);
498 if (friends != null && friends.Length > 0)
499 {
500 foreach (FriendInfo f in friends)
501 if (f.Friend.StartsWith(targetUserID.ToString()))
502 {
503 // Let's remove the secret
504 UUID id; string tmp = string.Empty, secret = string.Empty;
505 if (Util.ParseUniversalUserIdentifier(f.Friend, out id, out tmp, out tmp, out tmp, out secret))
506 return f.Friend.Replace(secret, "0");
507 }
508 }
509
510 return string.Empty;
511 }
488 } 512 }
489 513
490 class TravelingAgentInfo 514 class TravelingAgentInfo