From bfcc57c0712170e3431617bcb09999bfbb96b8dd Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 1 Mar 2010 00:02:14 +0000 Subject: Change friends to handle offers as it was originally designed. This may need to be changed in SQLite & MSSQL as well --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 8 ++------ OpenSim/Region/Framework/Interfaces/IFriendsModule.cs | 13 ------------- 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 3a86a46..32c2a43 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -194,10 +194,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends get { return null; } } - public void OfferFriendship(UUID fromUserId, IClientAPI toUserClient, string offerMessage) - { - } - public uint GetFriendPerms(UUID principalID, UUID friendID) { if (!m_Friends.ContainsKey(principalID)) @@ -453,8 +449,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends // This user wants to be friends with the other user. // Let's add both relations to the DB, but one of them is inactive (-1) - FriendsService.StoreFriend(principalID, friendID.ToString(), 1); - FriendsService.StoreFriend(friendID, principalID.ToString(), -1); + FriendsService.StoreFriend(principalID, friendID.ToString(), 0); // Now let's ask the other user to be friends with this user ForwardFriendshipOffer(principalID, friendID, im); @@ -486,6 +481,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends private void OnApproveFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List callingCardFolders) { FriendsService.StoreFriend(agentID, friendID.ToString(), 1); + FriendsService.StoreFriend(friendID, agentID.ToString(), 1); // update the local cache m_Friends[agentID].Friends = FriendsService.GetFriends(agentID); diff --git a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs index a0a1e3a..0ff7dee 100644 --- a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs @@ -33,19 +33,6 @@ namespace OpenSim.Region.Framework.Interfaces { public interface IFriendsModule { - /// - /// Offer a friendship to a user from the server end rather than by direct initiation from a client. - /// - /// - /// A user with this id must existing in the user data store, but need not be logged on. - /// - /// - /// An actually logged in client to which the offer is being made. - /// FIXME: This is somewhat too tightly coupled - it should arguably be possible to offer friendships even if the - /// receiving user is not currently online. - /// - /// - void OfferFriendship(UUID fromUserId, IClientAPI toUserClient, string offerMessage); uint GetFriendPerms(UUID PrincipalID, UUID FriendID); void SendFriendsOnlineIfNeeded(IClientAPI client); } -- cgit v1.1