From 717fd3b5b91f54113ef554799f124275d5489ea1 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Wed, 3 Jun 2009 12:48:04 +0000 Subject: From: Chris Yeoh This patch adds oar file date and time (UTC) meta data to an oar file when it is created. It also adds a unique ID, though this id does not in anyway identify the machine that the oar file was created on. When an oar file with this meta data is loaded this extra information is saved with the region settings and available via LSL through: - osLoadedCreationDate() - osLoadedCreationTime() - osLoadedCreationID() If there is no meta data these fields will be blank. Subsequent oar file loads will erase the information for the previous oar file load. Persistence has only been implemented for MySQL, the other backends need updating. Overall this allows us to much more easily identify the specific version of software that clients are using. Its very straightforward to edit the oar file to change the ID string to be something more human friendly. Included in the patch is a new file OpenSim/Data/MySQL/Resources/030_RegionStore.sql required for the MySQL DB migration. btw I had a chat with justincc about this a few weeks ago since he wrote the oar file import/export and he sounded happy to accept something that included date/time information but didn't want anything that would silently leak private information like machine names. --- .../Shared/Api/Implementation/OSSL_Api.cs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index d759b77..9b65d8d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1709,5 +1709,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return result; } + + public string osLoadedCreationDate() + { + CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); + m_host.AddScriptLPS(1); + + return World.RegionInfo.RegionSettings.LoadedCreationDate; + } + + public string osLoadedCreationTime() + { + CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationTime"); + m_host.AddScriptLPS(1); + + return World.RegionInfo.RegionSettings.LoadedCreationTime; + } + + public string osLoadedCreationID() + { + CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationID"); + m_host.AddScriptLPS(1); + + return World.RegionInfo.RegionSettings.LoadedCreationID; + } + } } -- cgit v1.1