aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-29 18:31:57 +0100
committerJustin Clark-Casey (justincc)2012-03-29 18:31:57 +0100
commitbf09d6a22be5f8e7a2584eaa11ccbc1c61cc6753 (patch)
tree3f5c8a55d95c539fc8a4887465a1c601b32a0b44 /OpenSim/Region/ClientStack/Linden/UDP
parentAdd simple regression test for logging in with offline friends. Don't expect... (diff)
downloadopensim-SC_OLD-bf09d6a22be5f8e7a2584eaa11ccbc1c61cc6753.zip
opensim-SC_OLD-bf09d6a22be5f8e7a2584eaa11ccbc1c61cc6753.tar.gz
opensim-SC_OLD-bf09d6a22be5f8e7a2584eaa11ccbc1c61cc6753.tar.bz2
opensim-SC_OLD-bf09d6a22be5f8e7a2584eaa11ccbc1c61cc6753.tar.xz
refactor: Stop passing both IClientAPI and agentID to friend event listeners, these are redundant. Replace a few magic numbers with FriendRights enum already used elsewhere.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 9899669..f79597e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5784,7 +5784,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5784 // My guess is this is the folder to stick the calling card into 5784 // My guess is this is the folder to stick the calling card into
5785 List<UUID> callingCardFolders = new List<UUID>(); 5785 List<UUID> callingCardFolders = new List<UUID>();
5786 5786
5787 UUID agentID = afriendpack.AgentData.AgentID;
5788 UUID transactionID = afriendpack.TransactionBlock.TransactionID; 5787 UUID transactionID = afriendpack.TransactionBlock.TransactionID;
5789 5788
5790 for (int fi = 0; fi < afriendpack.FolderData.Length; fi++) 5789 for (int fi = 0; fi < afriendpack.FolderData.Length; fi++)
@@ -5795,10 +5794,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5795 FriendActionDelegate handlerApproveFriendRequest = OnApproveFriendRequest; 5794 FriendActionDelegate handlerApproveFriendRequest = OnApproveFriendRequest;
5796 if (handlerApproveFriendRequest != null) 5795 if (handlerApproveFriendRequest != null)
5797 { 5796 {
5798 handlerApproveFriendRequest(this, agentID, transactionID, callingCardFolders); 5797 handlerApproveFriendRequest(this, transactionID, callingCardFolders);
5799 } 5798 }
5800 return true;
5801 5799
5800 return true;
5802 } 5801 }
5803 5802
5804 private bool HandlerDeclineFriendship(IClientAPI sender, Packet Pack) 5803 private bool HandlerDeclineFriendship(IClientAPI sender, Packet Pack)
@@ -5817,7 +5816,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5817 if (OnDenyFriendRequest != null) 5816 if (OnDenyFriendRequest != null)
5818 { 5817 {
5819 OnDenyFriendRequest(this, 5818 OnDenyFriendRequest(this,
5820 dfriendpack.AgentData.AgentID,
5821 dfriendpack.TransactionBlock.TransactionID, 5819 dfriendpack.TransactionBlock.TransactionID,
5822 null); 5820 null);
5823 } 5821 }
@@ -5837,14 +5835,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5837 } 5835 }
5838 #endregion 5836 #endregion
5839 5837
5840 UUID listOwnerAgentID = tfriendpack.AgentData.AgentID;
5841 UUID exFriendID = tfriendpack.ExBlock.OtherID; 5838 UUID exFriendID = tfriendpack.ExBlock.OtherID;
5842 FriendshipTermination TerminateFriendshipHandler = OnTerminateFriendship; 5839 FriendshipTermination TerminateFriendshipHandler = OnTerminateFriendship;
5843 if (TerminateFriendshipHandler != null) 5840 if (TerminateFriendshipHandler != null)
5844 { 5841 {
5845 TerminateFriendshipHandler(this, listOwnerAgentID, exFriendID); 5842 TerminateFriendshipHandler(this, exFriendID);
5846 return true; 5843 return true;
5847 } 5844 }
5845
5848 return false; 5846 return false;
5849 } 5847 }
5850 5848
@@ -11162,12 +11160,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11162 return true; 11160 return true;
11163 } 11161 }
11164 #endregion 11162 #endregion
11163
11165 GrantUserFriendRights GrantUserRightsHandler = OnGrantUserRights; 11164 GrantUserFriendRights GrantUserRightsHandler = OnGrantUserRights;
11166 if (GrantUserRightsHandler != null) 11165 if (GrantUserRightsHandler != null)
11167 GrantUserRightsHandler(this, 11166 GrantUserRightsHandler(this,
11168 GrantUserRights.AgentData.AgentID,
11169 GrantUserRights.Rights[0].AgentRelated, 11167 GrantUserRights.Rights[0].AgentRelated,
11170 GrantUserRights.Rights[0].RelatedRights); 11168 GrantUserRights.Rights[0].RelatedRights);
11169
11171 return true; 11170 return true;
11172 } 11171 }
11173 11172