From 5c2ffa260cd5a04d6377ffff0e3c77781f36cf5a Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 29 Mar 2012 00:31:11 +0100 Subject: [PATCH] Pushing the Avination Calling card hooks. Module to follow. --- .../Avatar/Friends/FriendsModule.cs | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index f59ba2b5ce..96abef499f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -333,7 +333,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends //m_log.DebugFormat("[XXX]: OnClientLogin!"); // Inform the friends that this user is online StatusChange(agentID, true); - + // Register that we need to send the list of online friends to this user lock (m_NeedsListOfOnlineFriends) m_NeedsListOfOnlineFriends.Add(agentID); @@ -608,8 +608,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends { StoreFriendships(client.AgentId, friendID); - // Update the local cache - RecacheFriends(client); + ICallingCardModule ccm = client.Scene.RequestModuleInterface(); + if (ccm != null) + { + ccm.CreateCallingCard(client.AgentId, friendID, UUID.Zero); + } + + // Update the local cache. + CacheFriends(client); // // Notify the friend @@ -784,6 +790,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends (byte)OpenMetaverse.InstantMessageDialog.FriendshipAccepted, userID.ToString(), false, Vector3.Zero); friendClient.SendInstantMessage(im); + ICallingCardModule ccm = friendClient.Scene.RequestModuleInterface(); + if (ccm != null) + { + ccm.CreateCallingCard(friendID, userID, UUID.Zero); + } + + // Update the local cache RecacheFriends(friendClient); @@ -806,7 +819,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends // we're done return true; } - + return false; } @@ -858,7 +871,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends public bool LocalStatusNotification(UUID userID, UUID friendID, bool online) { -// m_log.DebugFormat("[FRIENDS]: Local Status Notify {0} that user {1} is {2}", friendID, userID, online); + //m_log.DebugFormat("[FRIENDS]: Local Status Notify {0} that user {1} is {2}", friendID, userID, online); IClientAPI friendClient = LocateClientObject(friendID); if (friendClient != null) {