diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 7a2a46e..529d7cf 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
241 | client.OnInstantMessage += OnInstantMessage; | 241 | client.OnInstantMessage += OnInstantMessage; |
242 | client.OnApproveFriendRequest += OnApproveFriendRequest; | 242 | client.OnApproveFriendRequest += OnApproveFriendRequest; |
243 | client.OnDenyFriendRequest += OnDenyFriendRequest; | 243 | client.OnDenyFriendRequest += OnDenyFriendRequest; |
244 | client.OnTerminateFriendship += OnTerminateFriendship; | 244 | client.OnTerminateFriendship += (thisClient, agentID, exfriendID) => RemoveFriendship(thisClient, exfriendID); |
245 | client.OnGrantUserRights += OnGrantUserRights; | 245 | client.OnGrantUserRights += OnGrantUserRights; |
246 | 246 | ||
247 | Util.FireAndForget(delegate { FetchFriendslist(client); }); | 247 | Util.FireAndForget(delegate { FetchFriendslist(client); }); |
@@ -635,10 +635,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
635 | } | 635 | } |
636 | } | 636 | } |
637 | } | 637 | } |
638 | 638 | ||
639 | private void OnTerminateFriendship(IClientAPI client, UUID agentID, UUID exfriendID) | 639 | public void RemoveFriendship(IClientAPI client, UUID exfriendID) |
640 | { | 640 | { |
641 | if (!DeleteFriendship(agentID, exfriendID)) | 641 | if (!DeleteFriendship(client.AgentId, exfriendID)) |
642 | client.SendAlertMessage("Unable to terminate friendship on this sim."); | 642 | client.SendAlertMessage("Unable to terminate friendship on this sim."); |
643 | 643 | ||
644 | // Update local cache | 644 | // Update local cache |
@@ -661,9 +661,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
661 | if (friendSession != null) | 661 | if (friendSession != null) |
662 | { | 662 | { |
663 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | 663 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); |
664 | m_FriendsSimConnector.FriendshipTerminated(region, agentID, exfriendID); | 664 | m_FriendsSimConnector.FriendshipTerminated(region, client.AgentId, exfriendID); |
665 | } | 665 | } |
666 | } | 666 | } |
667 | } | 667 | } |
668 | 668 | ||
669 | private void OnGrantUserRights(IClientAPI remoteClient, UUID requester, UUID target, int rights) | 669 | private void OnGrantUserRights(IClientAPI remoteClient, UUID requester, UUID target, int rights) |