Changed GetAgents to take string[] instead of UUID[]
parent
0f5219a004
commit
b8dfccb227
|
@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
|
||||||
|
|
||||||
if (serviceDll == String.Empty)
|
if (serviceDll == String.Empty)
|
||||||
{
|
{
|
||||||
m_log.Error("[LOCAL PRESENCE CONNECTOR]: No LocalServiceModule named in section InventoryService");
|
m_log.Error("[LOCAL PRESENCE CONNECTOR]: No LocalServiceModule named in section PresenceService");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
|
||||||
return m_PresenceService.GetAgent(sessionID);
|
return m_PresenceService.GetAgent(sessionID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PresenceInfo[] GetAgents(UUID[] principalIDs)
|
public PresenceInfo[] GetAgents(string[] principalIDs)
|
||||||
{
|
{
|
||||||
return m_PresenceService.GetAgents(principalIDs);
|
return m_PresenceService.GetAgents(principalIDs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,6 @@ namespace OpenSim.Services.Interfaces
|
||||||
bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt);
|
bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt);
|
||||||
|
|
||||||
PresenceInfo GetAgent(UUID sessionID);
|
PresenceInfo GetAgent(UUID sessionID);
|
||||||
PresenceInfo[] GetAgents(UUID[] PrincipalIDs);
|
PresenceInfo[] GetAgents(string[] principalIDs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,30 +116,34 @@ namespace OpenSim.Services.PresenceService
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PresenceInfo[] GetAgents(UUID[] PrincipalIDs)
|
public PresenceInfo[] GetAgents(string[] principalIDs)
|
||||||
{
|
{
|
||||||
List<PresenceInfo> info = new List<PresenceInfo>();
|
List<PresenceInfo> info = new List<PresenceInfo>();
|
||||||
|
|
||||||
foreach (UUID principalID in PrincipalIDs)
|
foreach (string principalIDStr in principalIDs)
|
||||||
{
|
{
|
||||||
PresenceData[] data = m_Database.Get("PrincipalID",
|
UUID principalID = UUID.Zero;
|
||||||
principalID.ToString());
|
if (UUID.TryParse(principalIDStr, out principalID))
|
||||||
|
|
||||||
foreach (PresenceData d in data)
|
|
||||||
{
|
{
|
||||||
PresenceInfo ret = new PresenceInfo();
|
PresenceData[] data = m_Database.Get("PrincipalID",
|
||||||
|
principalID.ToString());
|
||||||
|
|
||||||
ret.PrincipalID = d.PrincipalID;
|
foreach (PresenceData d in data)
|
||||||
ret.RegionID = d.RegionID;
|
{
|
||||||
ret.Online = bool.Parse(d.Data["Online"]);
|
PresenceInfo ret = new PresenceInfo();
|
||||||
ret.Login = Util.ToDateTime(Convert.ToInt32(
|
|
||||||
d.Data["Login"]));
|
|
||||||
ret.Logout = Util.ToDateTime(Convert.ToInt32(
|
|
||||||
d.Data["Logout"]));
|
|
||||||
ret.Position = Vector3.Parse(d.Data["Position"]);
|
|
||||||
ret.LookAt = Vector3.Parse(d.Data["LookAt"]);
|
|
||||||
|
|
||||||
info.Add(ret);
|
ret.PrincipalID = d.PrincipalID;
|
||||||
|
ret.RegionID = d.RegionID;
|
||||||
|
ret.Online = bool.Parse(d.Data["Online"]);
|
||||||
|
ret.Login = Util.ToDateTime(Convert.ToInt32(
|
||||||
|
d.Data["Login"]));
|
||||||
|
ret.Logout = Util.ToDateTime(Convert.ToInt32(
|
||||||
|
d.Data["Logout"]));
|
||||||
|
ret.Position = Vector3.Parse(d.Data["Position"]);
|
||||||
|
ret.LookAt = Vector3.Parse(d.Data["LookAt"]);
|
||||||
|
|
||||||
|
info.Add(ret);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue