aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 39b597e..2bfd3fb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -52,8 +52,9 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
52using OpenSim.Region.ScriptEngine.Interfaces; 52using OpenSim.Region.ScriptEngine.Interfaces;
53using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; 53using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
54using OpenSim.Services.Interfaces; 54using OpenSim.Services.Interfaces;
55 55using OpenSim.Services.Interfaces;
56using GridRegion = OpenSim.Services.Interfaces.GridRegion; 56using GridRegion = OpenSim.Services.Interfaces.GridRegion;
57using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
57 58
58using AssetLandmark = OpenSim.Framework.AssetLandmark; 59using AssetLandmark = OpenSim.Framework.AssetLandmark;
59 60
@@ -3842,13 +3843,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3842 3843
3843 UUID uuid = (UUID)id; 3844 UUID uuid = (UUID)id;
3844 3845
3845 UserProfileData userProfile = 3846 UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid);
3846 World.CommsManager.UserService.GetUserProfile(uuid);
3847 3847
3848 UserAgentData userAgent = 3848 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
3849 World.CommsManager.UserService.GetAgentByUUID(uuid); 3849 PresenceInfo pinfo = PresenceInfo.GetOnlinePresence(pinfos);
3850 3850
3851 if (userProfile == null || userAgent == null) 3851 if (pinfo == null)
3852 return UUID.Zero.ToString(); 3852 return UUID.Zero.ToString();
3853 3853
3854 string reply = String.Empty; 3854 string reply = String.Empty;
@@ -3857,17 +3857,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3857 { 3857 {
3858 case 1: // DATA_ONLINE (0|1) 3858 case 1: // DATA_ONLINE (0|1)
3859 // TODO: implement fetching of this information 3859 // TODO: implement fetching of this information
3860 if (userProfile.CurrentAgent!=null && userProfile.CurrentAgent.AgentOnline) 3860 if (pinfo != null)
3861 reply = "1"; 3861 reply = "1";
3862 else 3862 else
3863 reply = "0"; 3863 reply = "0";
3864 break; 3864 break;
3865 case 2: // DATA_NAME (First Last) 3865 case 2: // DATA_NAME (First Last)
3866 reply = userProfile.FirstName + " " + userProfile.SurName; 3866 reply = account.FirstName + " " + account.LastName;
3867 break; 3867 break;
3868 case 3: // DATA_BORN (YYYY-MM-DD) 3868 case 3: // DATA_BORN (YYYY-MM-DD)
3869 DateTime born = new DateTime(1970, 1, 1, 0, 0, 0, 0); 3869 DateTime born = new DateTime(1970, 1, 1, 0, 0, 0, 0);
3870 born = born.AddSeconds(userProfile.Created); 3870 born = born.AddSeconds(account.Created);
3871 reply = born.ToString("yyyy-MM-dd"); 3871 reply = born.ToString("yyyy-MM-dd");
3872 break; 3872 break;
3873 case 4: // DATA_RATING (0,0,0,0,0,0) 3873 case 4: // DATA_RATING (0,0,0,0,0,0)