aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs16
2 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index 1719447..34f14df 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -432,6 +432,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
432 GridInstantMessage im = new GridInstantMessage(client.Scene, client.AgentId, client.Name, friendID, 432 GridInstantMessage im = new GridInstantMessage(client.Scene, client.AgentId, client.Name, friendID,
433 (byte)OpenMetaverse.InstantMessageDialog.FriendshipAccepted, client.AgentId.ToString(), false, Vector3.Zero); 433 (byte)OpenMetaverse.InstantMessageDialog.FriendshipAccepted, client.AgentId.ToString(), false, Vector3.Zero);
434 friendClient.SendInstantMessage(im); 434 friendClient.SendInstantMessage(im);
435 client.SendAgentOnline(new UUID[] { friendID });
435 // we're done 436 // we're done
436 return; 437 return;
437 } 438 }
@@ -442,7 +443,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
442 { 443 {
443 GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); 444 GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID);
444 m_FriendsSimConnector.FriendshipApproved(region, agentID, friendID); 445 m_FriendsSimConnector.FriendshipApproved(region, agentID, friendID);
446 client.SendAgentOnline(new UUID[] { friendID });
445 } 447 }
448
446 } 449 }
447 450
448 private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List<UUID> callingCardFolders) 451 private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List<UUID> callingCardFolders)
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
index 4e57394..bafad82 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
@@ -123,6 +123,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
123 return; 123 return;
124 124
125 IClientAPI client = (IClientAPI)sender; 125 IClientAPI client = (IClientAPI)sender;
126 m_log.DebugFormat("[PRESENCE MODULE]: OnlineNotification requested by {0}", client.Name);
126 127
127 PresenceInfo[] status = PresenceService.GetAgents(args.ToArray()); 128 PresenceInfo[] status = PresenceService.GetAgents(args.ToArray());
128 129
@@ -131,10 +132,21 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
131 132
132 foreach (PresenceInfo pi in status) 133 foreach (PresenceInfo pi in status)
133 { 134 {
135 UUID uuid = new UUID(pi.UserID);
134 if (pi.Online) 136 if (pi.Online)
135 online.Add(new UUID(pi.UserID)); 137 {
138 if (!online.Contains(uuid))
139 {
140 online.Add(uuid);
141 if (offline.Contains(uuid))
142 offline.Remove(uuid);
143 }
144 }
136 else 145 else
137 offline.Add(new UUID(pi.UserID)); 146 {
147 if (!online.Contains(uuid) && !offline.Contains(uuid))
148 offline.Add(uuid);
149 }
138 } 150 }
139 151
140 if (online.Count > 0) 152 if (online.Count > 0)