From a4f7937eb338df588c02ce44200876210d0d58c3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 7 Dec 2010 03:08:48 +0100 Subject: [PATCH] Add the interface needed to revive calling cards --- OpenSim/Framework/ICallingCardModule.cs | 13 +++++++++++++ .../CoreModules/Avatar/Friends/FriendsModule.cs | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 OpenSim/Framework/ICallingCardModule.cs diff --git a/OpenSim/Framework/ICallingCardModule.cs b/OpenSim/Framework/ICallingCardModule.cs new file mode 100644 index 0000000000..6e343bbd3b --- /dev/null +++ b/OpenSim/Framework/ICallingCardModule.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenMetaverse; +using OpenSim.Framework; + +namespace OpenSim.Framework +{ + public interface ICallingCardModule + { + void CreateCallingCard(UUID userID, UUID creatorID, UUID folderID); + } +} diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 45c3f49420..613a054fb2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -516,6 +516,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends FriendsService.StoreFriend(agentID, friendID.ToString(), 1); FriendsService.StoreFriend(friendID, agentID.ToString(), 1); + ICallingCardModule ccm = client.Scene.RequestModuleInterface(); + if (ccm != null) + { + ccm.CreateCallingCard(agentID, friendID, UUID.Zero); + } + // Update the local cache UpdateFriendsCache(agentID); @@ -679,6 +685,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 UpdateFriendsCache(friendID);