diff options
author | Teravus Ovares | 2008-04-14 01:10:48 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-14 01:10:48 +0000 |
commit | 30f93b2201a09aeb25ac013fbb59bcb5374d1ba5 (patch) | |
tree | 6945c6e6cd239cd2d20cef96941aaa608cf45498 /OpenSim/Region/Environment/Modules/FriendsModule.cs | |
parent | * Correct comment from previous patch - I'm not reversing mantis #912 at all,... (diff) | |
download | opensim-SC-30f93b2201a09aeb25ac013fbb59bcb5374d1ba5.zip opensim-SC-30f93b2201a09aeb25ac013fbb59bcb5374d1ba5.tar.gz opensim-SC-30f93b2201a09aeb25ac013fbb59bcb5374d1ba5.tar.bz2 opensim-SC-30f93b2201a09aeb25ac013fbb59bcb5374d1ba5.tar.xz |
Fix for mantis 952
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/FriendsModule.cs | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index fad297e..a6d44ee 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs | |||
@@ -195,37 +195,44 @@ namespace OpenSim.Region.Environment.Modules | |||
195 | updateUsers.Add(fli.Friend); | 195 | updateUsers.Add(fli.Friend); |
196 | } | 196 | } |
197 | } | 197 | } |
198 | for (int i = 0; i < updateUsers.Count; i++) | 198 | lock (updateUsers) |
199 | { | 199 | { |
200 | List<FriendListItem> flfli = new List<FriendListItem>(); | 200 | for (int i = 0; i < updateUsers.Count; i++) |
201 | lock (FriendLists) | ||
202 | { | 201 | { |
203 | if (FriendLists.ContainsKey(updateUsers[i])) | 202 | List<FriendListItem> flfli = new List<FriendListItem>(); |
204 | flfli = FriendLists[updateUsers[i]]; | 203 | |
205 | } | 204 | lock (FriendLists) |
206 | for (int j = 0; j < flfli.Count; j++) | ||
207 | { | ||
208 | if (flfli[i].Friend == AgentId) | ||
209 | { | 205 | { |
210 | flfli[i].onlinestatus = false; | 206 | if (FriendLists.ContainsKey(updateUsers[i])) |
207 | flfli = FriendLists[updateUsers[i]]; | ||
211 | } | 208 | } |
212 | 209 | ||
213 | } | 210 | for (int j = 0; j < flfli.Count; j++) |
211 | { | ||
212 | if (flfli[i].Friend == AgentId) | ||
213 | { | ||
214 | flfli[i].onlinestatus = false; | ||
215 | } | ||
214 | 216 | ||
215 | } | 217 | } |
216 | for (int i = 0; i < updateUsers.Count; i++) | 218 | |
217 | { | 219 | |
218 | ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); | 220 | } |
219 | if (av != null) | 221 | |
222 | for (int i = 0; i < updateUsers.Count; i++) | ||
220 | { | 223 | { |
224 | ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); | ||
225 | if (av != null) | ||
226 | { | ||
221 | 227 | ||
222 | OfflineNotificationPacket onp = new OfflineNotificationPacket(); | 228 | OfflineNotificationPacket onp = new OfflineNotificationPacket(); |
223 | OfflineNotificationPacket.AgentBlockBlock[] onpb = new OfflineNotificationPacket.AgentBlockBlock[1]; | 229 | OfflineNotificationPacket.AgentBlockBlock[] onpb = new OfflineNotificationPacket.AgentBlockBlock[1]; |
224 | OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock(); | 230 | OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock(); |
225 | onpbl.AgentID = AgentId; | 231 | onpbl.AgentID = AgentId; |
226 | onpb[0] = onpbl; | 232 | onpb[0] = onpbl; |
227 | onp.AgentBlock = onpb; | 233 | onp.AgentBlock = onpb; |
228 | av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task); | 234 | av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task); |
235 | } | ||
229 | } | 236 | } |
230 | } | 237 | } |
231 | lock (FriendLists) | 238 | lock (FriendLists) |