aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/InstantMessage
diff options
context:
space:
mode:
authorDiva Canto2010-02-27 10:24:55 -0800
committerDiva Canto2010-02-27 10:24:55 -0800
commit3906a14857eb3fbef9705240763afb9af1c9e303 (patch)
tree2fe985bc0e4910303745a0d84e89e4965d974891 /OpenSim/Region/CoreModules/Avatar/InstantMessage
parentImplement the requestonlinenotification method (diff)
downloadopensim-SC_OLD-3906a14857eb3fbef9705240763afb9af1c9e303.zip
opensim-SC_OLD-3906a14857eb3fbef9705240763afb9af1c9e303.tar.gz
opensim-SC_OLD-3906a14857eb3fbef9705240763afb9af1c9e303.tar.bz2
opensim-SC_OLD-3906a14857eb3fbef9705240763afb9af1c9e303.tar.xz
Friends online notifications upon friendship now working (same sim only).
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs16
1 files changed, 14 insertions, 2 deletions
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)