aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces/IPresenceService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Interfaces/IPresenceService.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs
index 2dad7e6..a010611 100644
--- a/OpenSim/Services/Interfaces/IPresenceService.cs
+++ b/OpenSim/Services/Interfaces/IPresenceService.cs
@@ -90,6 +90,26 @@ namespace OpenSim.Services.Interfaces
90 90
91 return result; 91 return result;
92 } 92 }
93
94 public static PresenceInfo[] GetOnlinePresences(PresenceInfo[] pinfos)
95 {
96 if (pinfos == null)
97 return null;
98
99 List<PresenceInfo> lst = new List<PresenceInfo>(pinfos);
100 lst = lst.FindAll(delegate(PresenceInfo each) { return each.Online; });
101
102 return lst.ToArray();
103 }
104
105 public static PresenceInfo GetOnlinePresence(PresenceInfo[] pinfos)
106 {
107 pinfos = GetOnlinePresences(pinfos);
108 if (pinfos != null && pinfos.Length >= 1)
109 return pinfos[0];
110
111 return null;
112 }
93 } 113 }
94 114
95 public interface IPresenceService 115 public interface IPresenceService