Revert "* Changed 11 calls for session info to the more optimized API method"

This reverts commit 5dc9ea2f24.
Also makes online indicators and IM more robust
This commit is contained in:
root
2010-09-17 01:50:48 +02:00
parent 1e4e978f7f
commit 251f2444d0
4 changed files with 109 additions and 37 deletions

View File

@@ -4296,7 +4296,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
pinfo = World.PresenceService.GetAgent(uuid);
PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
if (pinfos != null && pinfos.Length > 0)
{
foreach (PresenceInfo p in pinfos)
{
if (p.RegionID != UUID.Zero)
{
pinfo = p;
}
}
}
ce = new UserInfoCacheEntry();
ce.time = Util.EnvironmentTickCount();
@@ -4315,7 +4325,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000)
{
pinfo = World.PresenceService.GetAgent(uuid);
PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
if (pinfos != null && pinfos.Length > 0)
{
foreach (PresenceInfo p in pinfos)
{
if (p.RegionID != UUID.Zero)
{
pinfo = p;
}
}
}
else
pinfo = null;
ce.time = Util.EnvironmentTickCount();
ce.pinfo = pinfo;