From d72769930aebb14ae4bfee9803adb13fbb44eb8b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 8 May 2010 07:44:07 -0700 Subject: More cleaning on presence. Friends online/offline works again. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b2eb585..79b6be3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3884,8 +3884,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); + PresenceInfo pinfo = null; PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); - PresenceInfo pinfo = PresenceInfo.GetOnlinePresence(pinfos); + if (pinfos != null && pinfos.Length > 0) + pinfo = pinfos[0]; if (pinfo == null) return UUID.Zero.ToString(); -- cgit v1.1