diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Interfaces/IPresenceService.cs | 2 | ||||
-rw-r--r-- | OpenSim/Services/PresenceService/PresenceService.cs | 42 |
2 files changed, 24 insertions, 20 deletions
diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 70d4b28..1cda13c 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs | |||
@@ -52,6 +52,6 @@ namespace OpenSim.Services.Interfaces | |||
52 | bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); | 52 | bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); |
53 | 53 | ||
54 | PresenceInfo GetAgent(UUID sessionID); | 54 | PresenceInfo GetAgent(UUID sessionID); |
55 | PresenceInfo[] GetAgents(UUID[] PrincipalIDs); | 55 | PresenceInfo[] GetAgents(string[] principalIDs); |
56 | } | 56 | } |
57 | } | 57 | } |
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index 6542c25..0529d3d 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs | |||
@@ -116,30 +116,34 @@ namespace OpenSim.Services.PresenceService | |||
116 | return ret; | 116 | return ret; |
117 | } | 117 | } |
118 | 118 | ||
119 | public PresenceInfo[] GetAgents(UUID[] PrincipalIDs) | 119 | public PresenceInfo[] GetAgents(string[] principalIDs) |
120 | { | 120 | { |
121 | List<PresenceInfo> info = new List<PresenceInfo>(); | 121 | List<PresenceInfo> info = new List<PresenceInfo>(); |
122 | 122 | ||
123 | foreach (UUID principalID in PrincipalIDs) | 123 | foreach (string principalIDStr in principalIDs) |
124 | { | 124 | { |
125 | PresenceData[] data = m_Database.Get("PrincipalID", | 125 | UUID principalID = UUID.Zero; |
126 | principalID.ToString()); | 126 | if (UUID.TryParse(principalIDStr, out principalID)) |
127 | |||
128 | foreach (PresenceData d in data) | ||
129 | { | 127 | { |
130 | PresenceInfo ret = new PresenceInfo(); | 128 | PresenceData[] data = m_Database.Get("PrincipalID", |
131 | 129 | principalID.ToString()); | |
132 | ret.PrincipalID = d.PrincipalID; | 130 | |
133 | ret.RegionID = d.RegionID; | 131 | foreach (PresenceData d in data) |
134 | ret.Online = bool.Parse(d.Data["Online"]); | 132 | { |
135 | ret.Login = Util.ToDateTime(Convert.ToInt32( | 133 | PresenceInfo ret = new PresenceInfo(); |
136 | d.Data["Login"])); | 134 | |
137 | ret.Logout = Util.ToDateTime(Convert.ToInt32( | 135 | ret.PrincipalID = d.PrincipalID; |
138 | d.Data["Logout"])); | 136 | ret.RegionID = d.RegionID; |
139 | ret.Position = Vector3.Parse(d.Data["Position"]); | 137 | ret.Online = bool.Parse(d.Data["Online"]); |
140 | ret.LookAt = Vector3.Parse(d.Data["LookAt"]); | 138 | ret.Login = Util.ToDateTime(Convert.ToInt32( |
141 | 139 | d.Data["Login"])); | |
142 | info.Add(ret); | 140 | ret.Logout = Util.ToDateTime(Convert.ToInt32( |
141 | d.Data["Logout"])); | ||
142 | ret.Position = Vector3.Parse(d.Data["Position"]); | ||
143 | ret.LookAt = Vector3.Parse(d.Data["LookAt"]); | ||
144 | |||
145 | info.Add(ret); | ||
146 | } | ||
143 | } | 147 | } |
144 | } | 148 | } |
145 | 149 | ||