Add the interface needed to revive calling cards

avinationmerge
Melanie 2010-12-07 03:08:48 +01:00
parent b325721d6f
commit a4f7937eb3
2 changed files with 26 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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<ICallingCardModule>();
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<ICallingCardModule>();
if (ccm != null)
{
ccm.CreateCallingCard(friendID, userID, UUID.Zero);
}
// Update the local cache
UpdateFriendsCache(friendID);