aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie Thielker2010-06-20 06:23:08 +0200
committerMelanie2010-07-29 23:20:38 +0100
commit2257e39edae4ab4ec8aa485808663b6d298085e3 (patch)
tree9b02b0c48759f0b11cd24fcc9aa38b0a5cc8cf2e /OpenSim/Region/ScriptEngine/Shared
parentAllow gods and estate managers/owners to be unaffected by parcel bans (diff)
downloadopensim-SC_OLD-2257e39edae4ab4ec8aa485808663b6d298085e3.zip
opensim-SC_OLD-2257e39edae4ab4ec8aa485808663b6d298085e3.tar.gz
opensim-SC_OLD-2257e39edae4ab4ec8aa485808663b6d298085e3.tar.bz2
opensim-SC_OLD-2257e39edae4ab4ec8aa485808663b6d298085e3.tar.xz
Make dataserver() return a 0 when agent id offline, instead of a timeout
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs9
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";