aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/PresenceService/PresenceService.cs
diff options
context:
space:
mode:
authorDiva Canto2009-12-27 16:07:16 -0800
committerDiva Canto2009-12-27 16:07:16 -0800
commitb8dfccb2272e12942f5364fa327ffd721292d8ad (patch)
tree250b655cff80a518ffe869ee959ca9e9932aae13 /OpenSim/Services/PresenceService/PresenceService.cs
parentAllow lists to be embedded in query strings (diff)
downloadopensim-SC_OLD-b8dfccb2272e12942f5364fa327ffd721292d8ad.zip
opensim-SC_OLD-b8dfccb2272e12942f5364fa327ffd721292d8ad.tar.gz
opensim-SC_OLD-b8dfccb2272e12942f5364fa327ffd721292d8ad.tar.bz2
opensim-SC_OLD-b8dfccb2272e12942f5364fa327ffd721292d8ad.tar.xz
Changed GetAgents to take string[] instead of UUID[]
Diffstat (limited to 'OpenSim/Services/PresenceService/PresenceService.cs')
-rw-r--r--OpenSim/Services/PresenceService/PresenceService.cs42
1 files changed, 23 insertions, 19 deletions
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