diff options
author | Diva Canto | 2010-02-25 16:11:04 -0800 |
---|---|---|
committer | Diva Canto | 2010-02-25 16:11:04 -0800 |
commit | 679ad9575083370204a6d83e9933323c9f60ae45 (patch) | |
tree | c2701a8f894e127a0b1ad32802bffe3374bd378c /OpenSim/Services/LLLoginService/LLLoginResponse.cs | |
parent | Implement initial online notifications (diff) | |
download | opensim-SC_OLD-679ad9575083370204a6d83e9933323c9f60ae45.zip opensim-SC_OLD-679ad9575083370204a6d83e9933323c9f60ae45.tar.gz opensim-SC_OLD-679ad9575083370204a6d83e9933323c9f60ae45.tar.bz2 opensim-SC_OLD-679ad9575083370204a6d83e9933323c9f60ae45.tar.xz |
List of friends now retrieved upon login. Configured and tested in standalone only.
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginResponse.cs')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginResponse.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 4db6a05..11a7473 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs | |||
@@ -35,6 +35,7 @@ using OpenSim.Framework; | |||
35 | using OpenSim.Framework.Capabilities; | 35 | using OpenSim.Framework.Capabilities; |
36 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
38 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; | ||
38 | 39 | ||
39 | using log4net; | 40 | using log4net; |
40 | using OpenMetaverse; | 41 | using OpenMetaverse; |
@@ -215,7 +216,7 @@ namespace OpenSim.Services.LLLoginService | |||
215 | } | 216 | } |
216 | 217 | ||
217 | public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, PresenceInfo pinfo, | 218 | public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, PresenceInfo pinfo, |
218 | GridRegion destination, List<InventoryFolderBase> invSkel, ILibraryService libService, | 219 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, |
219 | string where, string startlocation, Vector3 position, Vector3 lookAt, string message, | 220 | string where, string startlocation, Vector3 position, Vector3 lookAt, string message, |
220 | GridRegion home, IPEndPoint clientIP) | 221 | GridRegion home, IPEndPoint clientIP) |
221 | : this() | 222 | : this() |
@@ -230,8 +231,7 @@ namespace OpenSim.Services.LLLoginService | |||
230 | SecureSessionID = aCircuit.SecureSessionID; | 231 | SecureSessionID = aCircuit.SecureSessionID; |
231 | Message = message; | 232 | Message = message; |
232 | // While we don't have friends... | 233 | // While we don't have friends... |
233 | //BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(agentID)); | 234 | BuddList = ConvertFriendListItem(friendsList); |
234 | BuddList = new LLLoginResponse.BuddyList(); | ||
235 | StartLocation = where; | 235 | StartLocation = where; |
236 | 236 | ||
237 | FillOutHomeData(pinfo, home); | 237 | FillOutHomeData(pinfo, home); |
@@ -607,15 +607,15 @@ namespace OpenSim.Services.LLLoginService | |||
607 | } | 607 | } |
608 | 608 | ||
609 | 609 | ||
610 | private static LLLoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) | 610 | private static LLLoginResponse.BuddyList ConvertFriendListItem(FriendInfo[] friendsList) |
611 | { | 611 | { |
612 | LLLoginResponse.BuddyList buddylistreturn = new LLLoginResponse.BuddyList(); | 612 | LLLoginResponse.BuddyList buddylistreturn = new LLLoginResponse.BuddyList(); |
613 | foreach (FriendListItem fl in LFL) | 613 | foreach (FriendInfo finfo in friendsList) |
614 | { | 614 | { |
615 | LLLoginResponse.BuddyList.BuddyInfo buddyitem = new LLLoginResponse.BuddyList.BuddyInfo(fl.Friend); | 615 | LLLoginResponse.BuddyList.BuddyInfo buddyitem = new LLLoginResponse.BuddyList.BuddyInfo(finfo.Friend); |
616 | buddyitem.BuddyID = fl.Friend; | 616 | buddyitem.BuddyID = finfo.Friend; |
617 | buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms; | 617 | buddyitem.BuddyRightsHave = (int)finfo.TheirFlags; |
618 | buddyitem.BuddyRightsGiven = (int)fl.FriendPerms; | 618 | buddyitem.BuddyRightsGiven = (int)finfo.MyFlags; |
619 | buddylistreturn.AddNewBuddy(buddyitem); | 619 | buddylistreturn.AddNewBuddy(buddyitem); |
620 | } | 620 | } |
621 | return buddylistreturn; | 621 | return buddylistreturn; |
@@ -945,16 +945,16 @@ namespace OpenSim.Services.LLLoginService | |||
945 | { | 945 | { |
946 | public int BuddyRightsHave = 1; | 946 | public int BuddyRightsHave = 1; |
947 | public int BuddyRightsGiven = 1; | 947 | public int BuddyRightsGiven = 1; |
948 | public UUID BuddyID; | 948 | public string BuddyID; |
949 | 949 | ||
950 | public BuddyInfo(string buddyID) | 950 | public BuddyInfo(string buddyID) |
951 | { | 951 | { |
952 | BuddyID = new UUID(buddyID); | 952 | BuddyID = buddyID; |
953 | } | 953 | } |
954 | 954 | ||
955 | public BuddyInfo(UUID buddyID) | 955 | public BuddyInfo(UUID buddyID) |
956 | { | 956 | { |
957 | BuddyID = buddyID; | 957 | BuddyID = buddyID.ToString(); |
958 | } | 958 | } |
959 | 959 | ||
960 | public Hashtable ToHashTable() | 960 | public Hashtable ToHashTable() |
@@ -962,7 +962,7 @@ namespace OpenSim.Services.LLLoginService | |||
962 | Hashtable hTable = new Hashtable(); | 962 | Hashtable hTable = new Hashtable(); |
963 | hTable["buddy_rights_has"] = BuddyRightsHave; | 963 | hTable["buddy_rights_has"] = BuddyRightsHave; |
964 | hTable["buddy_rights_given"] = BuddyRightsGiven; | 964 | hTable["buddy_rights_given"] = BuddyRightsGiven; |
965 | hTable["buddy_id"] = BuddyID.ToString(); | 965 | hTable["buddy_id"] = BuddyID; |
966 | return hTable; | 966 | return hTable; |
967 | } | 967 | } |
968 | } | 968 | } |