diff options
author | Teravus Ovares | 2008-01-01 06:12:04 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-01 06:12:04 +0000 |
commit | b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6 (patch) | |
tree | d7e9e370371edbcbebb8436791ba8b1cd940ab69 /OpenSim/Region/Communications | |
parent | Make it possible for new inventory 'libraries' to be added without changing t... (diff) | |
download | opensim-SC_OLD-b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6.zip opensim-SC_OLD-b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6.tar.gz opensim-SC_OLD-b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6.tar.bz2 opensim-SC_OLD-b4c9b6bd19c0725ae5bf60172db75ebc63ba72c6.tar.xz |
* You can add and remove a friend in standalone now within the same simulator. It saves.
* You can add and remove a friend in grid mode now within the same simulator. It doesn't save yet.
* I got rid of Mr. OpenSim as a friend.. he bothers me /:b...
Diffstat (limited to 'OpenSim/Region/Communications')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | 43 |
2 files changed, 59 insertions, 2 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 0fb86af..2c92491 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -138,8 +138,8 @@ namespace OpenSim.Region.Communications.Local | |||
138 | theUser.currentAgent.currentHandle = reg.RegionHandle; | 138 | theUser.currentAgent.currentHandle = reg.RegionHandle; |
139 | 139 | ||
140 | LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); | 140 | LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); |
141 | buddyList.AddNewBuddy(new LoginResponse.BuddyList.BuddyInfo("11111111-1111-0000-0000-000100bba000")); | 141 | |
142 | response.BuddList = buddyList; | 142 | response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.UUID)); |
143 | 143 | ||
144 | Login _login = new Login(); | 144 | Login _login = new Login(); |
145 | //copy data to login object | 145 | //copy data to login object |
@@ -162,7 +162,20 @@ namespace OpenSim.Region.Communications.Local | |||
162 | MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion); | 162 | MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) | ||
166 | { | ||
167 | LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList(); | ||
168 | foreach (FriendListItem fl in LFL) | ||
169 | { | ||
170 | LoginResponse.BuddyList.BuddyInfo buddyitem = new LoginResponse.BuddyList.BuddyInfo(fl.Friend); | ||
171 | buddyitem.BuddyID = fl.Friend; | ||
172 | buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms; | ||
173 | buddyitem.BuddyRightsGiven = (int)fl.FriendPerms; | ||
174 | buddylistreturn.AddNewBuddy(buddyitem); | ||
165 | 175 | ||
176 | } | ||
177 | return buddylistreturn; | ||
178 | } | ||
166 | protected override InventoryData CreateInventoryData(LLUUID userID) | 179 | protected override InventoryData CreateInventoryData(LLUUID userID) |
167 | { | 180 | { |
168 | List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); | 181 | List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); |
@@ -207,6 +220,7 @@ namespace OpenSim.Region.Communications.Local | |||
207 | 220 | ||
208 | return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); | 221 | return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); |
209 | } | 222 | } |
223 | |||
210 | } | 224 | } |
211 | } | 225 | } |
212 | } \ No newline at end of file | 226 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 3a2e138..c205d08 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -213,5 +213,48 @@ namespace OpenSim.Region.Communications.OGS1 | |||
213 | { | 213 | { |
214 | throw new Exception("The method or operation is not implemented."); | 214 | throw new Exception("The method or operation is not implemented."); |
215 | } | 215 | } |
216 | |||
217 | #region IUserServices Friend Methods | ||
218 | /// <summary> | ||
219 | /// Adds a new friend to the database for XUser | ||
220 | /// </summary> | ||
221 | /// <param name="friendlistowner">The agent that who's friends list is being added to</param> | ||
222 | /// <param name="friend">The agent that being added to the friends list of the friends list owner</param> | ||
223 | /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param> | ||
224 | public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) | ||
225 | { | ||
226 | |||
227 | } | ||
228 | |||
229 | /// <summary> | ||
230 | /// Delete friend on friendlistowner's friendlist. | ||
231 | /// </summary> | ||
232 | /// <param name="friendlistowner">The agent that who's friends list is being updated</param> | ||
233 | /// <param name="friend">The Ex-friend agent</param> | ||
234 | public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) | ||
235 | { | ||
236 | |||
237 | } | ||
238 | |||
239 | /// <summary> | ||
240 | /// Update permissions for friend on friendlistowner's friendlist. | ||
241 | /// </summary> | ||
242 | /// <param name="friendlistowner">The agent that who's friends list is being updated</param> | ||
243 | /// <param name="friend">The agent that is getting or loosing permissions</param> | ||
244 | /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param> | ||
245 | public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) | ||
246 | { | ||
247 | |||
248 | } | ||
249 | /// <summary> | ||
250 | /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner | ||
251 | /// </summary> | ||
252 | /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> | ||
253 | public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) | ||
254 | { | ||
255 | return new List<FriendListItem>(); | ||
256 | } | ||
257 | |||
258 | #endregion | ||
216 | } | 259 | } |
217 | } \ No newline at end of file | 260 | } \ No newline at end of file |