mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user