From 24a68e36fb07e4366c8f9f680bcbbf85ac92b2f3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 12:32:36 -0700 Subject: Bug fix: wrong name of requester in local friendship offer. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 80982fd..5552be7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -503,7 +503,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends UUID principalID = new UUID(im.fromAgentID); UUID friendID = new UUID(im.toAgentID); - m_log.DebugFormat("[FRIENDS]: {0} offered friendship to {1}", principalID, friendID); + m_log.DebugFormat("[FRIENDS]: {0} ({1}) offered friendship to {2}", principalID, im.fromAgentName, friendID); // This user wants to be friends with the other user. // Let's add the relation backwards, in case the other is not online @@ -521,6 +521,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends im.imSessionID = im.fromAgentID; // Try the local sim + UserAccount account = UserAccountService.GetUserAccount(Scene.RegionInfo.ScopeID, agentID); + im.fromAgentName = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName; + if (LocalFriendshipOffered(friendID, im)) return; -- cgit v1.1