diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Friends')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 2d6e27f..8c96392 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | |||
@@ -164,13 +164,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
164 | if (fli.Friend == client.AgentId) | 164 | if (fli.Friend == client.AgentId) |
165 | { | 165 | { |
166 | fli.onlinestatus = true; | 166 | fli.onlinestatus = true; |
167 | OnlineNotificationPacket onp = new OnlineNotificationPacket(); | 167 | LLUUID[] Agents = new LLUUID[1]; |
168 | OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[1]; | 168 | Agents[0] = client.AgentId; |
169 | OnlineNotificationPacket.AgentBlockBlock onpbl = new OnlineNotificationPacket.AgentBlockBlock(); | 169 | av.ControllingClient.SendAgentOnline(Agents); |
170 | onpbl.AgentID = client.AgentId; | 170 | |
171 | onpb[0] = onpbl; | ||
172 | onp.AgentBlock = onpb; | ||
173 | av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task); | ||
174 | } | 171 | } |
175 | } | 172 | } |
176 | } | 173 | } |
@@ -179,16 +176,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
179 | 176 | ||
180 | if (UpdateUsers.Count > 0) | 177 | if (UpdateUsers.Count > 0) |
181 | { | 178 | { |
182 | OnlineNotificationPacket onp = new OnlineNotificationPacket(); | 179 | |
183 | OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[UpdateUsers.Count]; | 180 | client.SendAgentOnline(UpdateUsers.ToArray()); |
184 | for (int i = 0; i < UpdateUsers.Count; i++) | 181 | |
185 | { | ||
186 | OnlineNotificationPacket.AgentBlockBlock onpbl = new OnlineNotificationPacket.AgentBlockBlock(); | ||
187 | onpbl.AgentID = UpdateUsers[i]; | ||
188 | onpb[i] = onpbl; | ||
189 | } | ||
190 | onp.AgentBlock = onpb; | ||
191 | client.OutPacket(onp, ThrottleOutPacketType.Task); | ||
192 | } | 182 | } |
193 | } | 183 | } |
194 | 184 | ||
@@ -278,13 +268,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
278 | ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); | 268 | ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); |
279 | if (av != null) | 269 | if (av != null) |
280 | { | 270 | { |
281 | OfflineNotificationPacket onp = new OfflineNotificationPacket(); | 271 | LLUUID[] agents = new LLUUID[1]; |
282 | OfflineNotificationPacket.AgentBlockBlock[] onpb = new OfflineNotificationPacket.AgentBlockBlock[1]; | 272 | agents[0] = AgentId; |
283 | OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock(); | 273 | av.ControllingClient.SendAgentOffline(agents); |
284 | onpbl.AgentID = AgentId; | ||
285 | onpb[0] = onpbl; | ||
286 | onp.AgentBlock = onpb; | ||
287 | av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task); | ||
288 | } | 274 | } |
289 | } | 275 | } |
290 | } | 276 | } |
@@ -388,7 +374,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
388 | msg.timestamp = timestamp; | 374 | msg.timestamp = timestamp; |
389 | if (client != null) | 375 | if (client != null) |
390 | { | 376 | { |
391 | msg.fromAgentName = client.FirstName + " " + client.LastName; // fromAgentName; | 377 | msg.fromAgentName = client.Name; // fromAgentName; |
392 | } | 378 | } |
393 | else | 379 | else |
394 | { | 380 | { |
@@ -439,7 +425,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
439 | GridInstantMessage msg = new GridInstantMessage(); | 425 | GridInstantMessage msg = new GridInstantMessage(); |
440 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; | 426 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; |
441 | msg.fromAgentID = agentID.UUID; | 427 | msg.fromAgentID = agentID.UUID; |
442 | msg.fromAgentName = client.FirstName + " " + client.LastName; | 428 | msg.fromAgentName = client.Name; |
443 | msg.fromAgentSession = client.SessionId.UUID; | 429 | msg.fromAgentSession = client.SessionId.UUID; |
444 | msg.fromGroup = false; | 430 | msg.fromGroup = false; |
445 | msg.imSessionID = transactionID.UUID; | 431 | msg.imSessionID = transactionID.UUID; |
@@ -477,7 +463,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
477 | GridInstantMessage msg = new GridInstantMessage(); | 463 | GridInstantMessage msg = new GridInstantMessage(); |
478 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; | 464 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; |
479 | msg.fromAgentID = agentID.UUID; | 465 | msg.fromAgentID = agentID.UUID; |
480 | msg.fromAgentName = client.FirstName + " " + client.LastName; | 466 | msg.fromAgentName = client.Name; |
481 | msg.fromAgentSession = client.SessionId.UUID; | 467 | msg.fromAgentSession = client.SessionId.UUID; |
482 | msg.fromGroup = false; | 468 | msg.fromGroup = false; |
483 | msg.imSessionID = transactionID.UUID; | 469 | msg.imSessionID = transactionID.UUID; |