diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 417cef4..6edd08d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3918,22 +3918,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3918 | UUID uuid = (UUID)id; | 3918 | UUID uuid = (UUID)id; |
3919 | 3919 | ||
3920 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); | 3920 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); |
3921 | if (account == null) | ||
3922 | return UUID.Zero.ToString(); | ||
3923 | |||
3921 | 3924 | ||
3922 | PresenceInfo pinfo = null; | 3925 | PresenceInfo pinfo = null; |
3923 | PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); | 3926 | PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); |
3924 | if (pinfos != null && pinfos.Length > 0) | 3927 | if (pinfos != null && pinfos.Length > 0) |
3925 | pinfo = pinfos[0]; | 3928 | pinfo = pinfos[0]; |
3926 | 3929 | ||
3927 | if (pinfo == null) | ||
3928 | return UUID.Zero.ToString(); | ||
3929 | |||
3930 | string reply = String.Empty; | 3930 | string reply = String.Empty; |
3931 | 3931 | ||
3932 | switch (data) | 3932 | switch (data) |
3933 | { | 3933 | { |
3934 | case 1: // DATA_ONLINE (0|1) | 3934 | case 1: // DATA_ONLINE (0|1) |
3935 | // TODO: implement fetching of this information | 3935 | if (pinfo != null && pinfo.RegionID != UUID.Zero) |
3936 | if (pinfo != null) | ||
3937 | reply = "1"; | 3936 | reply = "1"; |
3938 | else | 3937 | else |
3939 | reply = "0"; | 3938 | reply = "0"; |