From 38e8853e5761d09a7e8f580dd277d9b99b834696 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Sat, 1 Nov 2008 22:09:48 +0000 Subject: Megapatch that fixes/adds: friend offer/deny/accept, friendship termination, on-/offline updates, calling cards for friends. This adds methods in the DB layer and changes the MessagingServer, so a full update (incl. UGAIM) is necessary to get it working. Older regions shouldn't break, nor should older UGAIM break newer regions, but friends/presence will only work with all concerned parts (UGAIM, source region and destination region) at this revision (or later). I added the DB code for MSSQL, too, but couldn't test that. BEWARE: May contain bugs. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 5b3bc98..363b09c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4129,7 +4129,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP handlerApproveFriendRequest(this, agentID, transactionID, callingCardFolders); } break; - + + case PacketType.DeclineFriendship: + DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack; + + if (OnDenyFriendRequest != null) + { + OnDenyFriendRequest(this, + dfriendpack.AgentData.AgentID, + dfriendpack.TransactionBlock.TransactionID, + null); + } + break; + case PacketType.TerminateFriendship: TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; UUID listOwnerAgentID = tfriendpack.AgentData.AgentID; @@ -7648,6 +7660,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(p, ThrottleOutPacketType.Task); } + public void SendTerminateFriend(UUID exFriendID) + { + TerminateFriendshipPacket p = (TerminateFriendshipPacket)PacketPool.Instance.GetPacket(PacketType.TerminateFriendship); + p.AgentData.AgentID = AgentId; + p.AgentData.SessionID = SessionId; + p.ExBlock.OtherID = exFriendID; + OutPacket(p, ThrottleOutPacketType.Task); + } + public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) { int i; -- cgit v1.1