From 11d8119a21c645d6a0d71edc7444f058ba89414b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 10 Oct 2012 01:37:57 +0100
Subject: Remove osDropAttachment threat level check wrongly placed in
OSSL_Api.ShoutErrorOnLackingOwnerPerms.
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 1 -
1 file changed, 1 deletion(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 31be450..279ad59 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3555,7 +3555,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// boolean indicating whether an error was shouted.
protected bool ShoutErrorOnLackingOwnerPerms(int perms, string errorPrefix)
{
- CheckThreatLevel(ThreatLevel.Moderate, "osDropAttachment");
m_host.AddScriptLPS(1);
bool fail = false;
if (m_item.PermsGranter != m_host.OwnerID)
--
cgit v1.1
From 756ac4f32104db9dcdfb1c1da81075299e2cbfb4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 10 Oct 2012 01:39:47 +0100
Subject: Correct osSetContentType() threat check to query osSetContentType
rather than osSetResponseType
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 279ad59..29bc163 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3545,10 +3545,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
///
public void osSetContentType(LSL_Key id, string type)
{
- CheckThreatLevel(ThreatLevel.High,"osSetResponseType");
+ CheckThreatLevel(ThreatLevel.High, "osSetContentType");
+
if (m_UrlModule != null)
m_UrlModule.HttpContentType(new UUID(id),type);
}
+
/// Shout an error if the object owner did not grant the script the specified permissions.
///
///
--
cgit v1.1
From f6e166cd0bfc868fe17fb003390872ae70190177 Mon Sep 17 00:00:00 2001
From: TBG Renfold
Date: Tue, 9 Oct 2012 14:56:25 +0100
Subject: Now using region flags for llRequestSimulatorData DATA_SIM_POS.
If the region is not classed a hypergrid region, then the region secret is checked to make sure that it is a valid UUID.
Just a temporary fix at this time.
---
.../Shared/Api/Implementation/LSL_Api.cs | 25 +++++++++++++++-------
1 file changed, 17 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 7620df3..6b08b00 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -56,6 +56,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
using PrimType = OpenSim.Region.Framework.Scenes.PrimType;
using AssetLandmark = OpenSim.Framework.AssetLandmark;
+using RegionFlags = OpenSim.Framework.RegionFlags;
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
@@ -9327,12 +9328,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScriptSleep(1000);
return UUID.Zero.ToString();
}
- if (m_ScriptEngine.World.RegionInfo.RegionName != simulator)
+
+ RegionFlags regionFlags = (RegionFlags)m_ScriptEngine.World.GridService.GetRegionFlags(info.ScopeID, info.RegionID);
+ if ((regionFlags & RegionFlags.Hyperlink) != 0)
{
- //Hypergrid Region co-ordinates
uint rx = 0, ry = 0;
+ //Hypergrid Region co-ordinates
Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry);
-
reply = new LSL_Vector(
rx,
ry,
@@ -9340,11 +9342,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
else
{
- //Local-cooridnates
- reply = new LSL_Vector(
- info.RegionLocX,
- info.RegionLocY,
- 0).ToString();
+ UUID regionSecret = UUID.Zero;
+ if (UUID.TryParse(info.RegionSecret, out regionSecret))
+ {
+ if (regionSecret != UUID.Zero)
+ {
+ //Local co-oridnates
+ reply = new LSL_Vector(
+ info.RegionLocX,
+ info.RegionLocY,
+ 0).ToString();
+ }
+ }
}
break;
case ScriptBaseClass.DATA_SIM_STATUS:
--
cgit v1.1
From 330b976a62b3153dadfb1acdaa99b60a9084453d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 13 Oct 2012 01:03:09 +0100
Subject: Improve on TBG Renfold's fix to llRequestSimulatorData DATA_SIM_POS
by only performing HG regionflags service check if the region secret is not
empty.
An empty RegionSecret is never HG, whilst a non-empty one may be HG or being genuinely used as a RegionSecret.
---
.../Shared/Api/Implementation/LSL_Api.cs | 44 ++++++++++++----------
1 file changed, 25 insertions(+), 19 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6b08b00..1e8dec8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -9314,11 +9314,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
GridRegion info;
- if (m_ScriptEngine.World.RegionInfo.RegionName == simulator) //Det data for this simulator?
-
- info = new GridRegion(m_ScriptEngine.World.RegionInfo);
+ if (World.RegionInfo.RegionName == simulator)
+ info = new GridRegion(World.RegionInfo);
else
- info = m_ScriptEngine.World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
+ info = World.GridService.GetRegionByName(m_ScriptEngine.World.RegionInfo.ScopeID, simulator);
switch (data)
{
@@ -9329,12 +9328,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return UUID.Zero.ToString();
}
- RegionFlags regionFlags = (RegionFlags)m_ScriptEngine.World.GridService.GetRegionFlags(info.ScopeID, info.RegionID);
- if ((regionFlags & RegionFlags.Hyperlink) != 0)
+ bool isHypergridRegion = false;
+
+ if (World.RegionInfo.RegionName != simulator && info.RegionSecret != "")
+ {
+ // Hypergrid is currently placing real destination region co-ords into RegionSecret.
+ // But other code can also use this field for a genuine RegionSecret! Therefore, if
+ // anything is present we need to disambiguate.
+ //
+ // FIXME: Hypergrid should be storing this data in a different field.
+ RegionFlags regionFlags
+ = (RegionFlags)m_ScriptEngine.World.GridService.GetRegionFlags(
+ info.ScopeID, info.RegionID);
+ isHypergridRegion = (regionFlags & RegionFlags.Hyperlink) != 0;
+ }
+
+ if (isHypergridRegion)
{
uint rx = 0, ry = 0;
- //Hypergrid Region co-ordinates
Utils.LongToUInts(Convert.ToUInt64(info.RegionSecret), out rx, out ry);
+
reply = new LSL_Vector(
rx,
ry,
@@ -9342,18 +9355,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
else
{
- UUID regionSecret = UUID.Zero;
- if (UUID.TryParse(info.RegionSecret, out regionSecret))
- {
- if (regionSecret != UUID.Zero)
- {
- //Local co-oridnates
- reply = new LSL_Vector(
- info.RegionLocX,
- info.RegionLocY,
- 0).ToString();
- }
- }
+ // Local grid co-oridnates
+ reply = new LSL_Vector(
+ info.RegionLocX,
+ info.RegionLocY,
+ 0).ToString();
}
break;
case ScriptBaseClass.DATA_SIM_STATUS:
--
cgit v1.1
From ab0294f0109416da0546e25797e7747b23071d33 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 16 Oct 2012 01:33:35 +0100
Subject: Add missing category paremeter to llGiveInventoryList grid IM
construction.
This was a regression from 16c9c1df Sat Oct 6 02:34:49 2012 +0100.
Should resolve http://opensimulator.org/mantis/view.php?id=6360
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 1e8dec8..ac74bf8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6459,7 +6459,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
GridInstantMessage msg = new GridInstantMessage(World,
m_host.OwnerID, m_host.Name, destID,
(byte)InstantMessageDialog.TaskInventoryOffered,
- false, string.Format("'{0}'"),
+ false, string.Format("'{0}'", category),
// We won't go so far as to add a SLURL, but this is the format used by LL as of 2012-10-06
// false, string.Format("'{0}' ( http://slurl.com/secondlife/{1}/{2}/{3}/{4} )", category, World.Name, (int)pos.X, (int)pos.Y, (int)pos.Z),
folderID, false, pos,
--
cgit v1.1
From ec044537d50b425178c4e081abcf325d28028480 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Thu, 18 Oct 2012 10:15:34 +0100
Subject: ensuring that operand order in llGetLinkName is internally consistent
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ac74bf8..42ab39a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3828,7 +3828,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
// simplest case, this prims link number
- if (m_host.LinkNum == linknum)
+ if (linknum == m_host.LinkNum)
return m_host.Name;
// Single prim
--
cgit v1.1
From 597df51f918327f2ac46bc452a3288ec624e029f Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Thu, 18 Oct 2012 10:16:42 +0100
Subject: the simplest case for llGetLinkName also applies to the LINK_THIS
constant
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 42ab39a..e8d0bea 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3828,7 +3828,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
// simplest case, this prims link number
- if (linknum == m_host.LinkNum)
+ if (linknum == m_host.LinkNum || linknum == ScriptBaseClass.LINK_THIS)
return m_host.Name;
// Single prim
--
cgit v1.1
From 645e3171b41be4c5611bb43a9c14ec1d501ff8b9 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Thu, 18 Oct 2012 10:18:46 +0100
Subject: since llGetLinkName has a "simplest case", it should be the first
check made.
---
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e8d0bea..e8bf5cf 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3804,6 +3804,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_String llGetLinkName(int linknum)
{
m_host.AddScriptLPS(1);
+ // simplest case, this prims link number
+ if (linknum == m_host.LinkNum || linknum == ScriptBaseClass.LINK_THIS)
+ return m_host.Name;
+
// parse for sitting avatare-names
List nametable = new List();
World.ForEachRootScenePresence(delegate(ScenePresence presence)
@@ -3827,10 +3831,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return nametable[totalprims - linknum];
}
- // simplest case, this prims link number
- if (linknum == m_host.LinkNum || linknum == ScriptBaseClass.LINK_THIS)
- return m_host.Name;
-
// Single prim
if (m_host.LinkNum == 0)
{
--
cgit v1.1
From af5383e479e264f2c257ff802f258bd03550e4b4 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Thu, 18 Oct 2012 10:22:41 +0100
Subject: altering documentation for llGetLinkName, as the current
documentation is rather lengthy for a "summary".
---
.../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e8bf5cf..cf801ba 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3773,6 +3773,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
///
+ /// Returns the name of the child prim or seated avatar matching the
+ /// specified link number.
+ ///
+ ///
+ /// The number of a link in the linkset or a link-related constant.
+ ///
+ ///
+ /// The name determined to match the specified link number.
+ ///
+ ///
/// The rules governing the returned name are not simple. The only
/// time a blank name is returned is if the target prim has a blank
/// name. If no prim with the given link number can be found then
@@ -3800,7 +3810,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// Mentions NULL_KEY being returned
/// http://wiki.secondlife.com/wiki/LlGetLinkName
/// Mentions using the LINK_* constants, some of which are negative
- ///
+ ///
public LSL_String llGetLinkName(int linknum)
{
m_host.AddScriptLPS(1);
--
cgit v1.1
From 2aac113ac14f22509343ae82eb2eb4c3d7ad85b1 Mon Sep 17 00:00:00 2001
From: BlueWall
Date: Sat, 20 Oct 2012 04:28:58 -0400
Subject: Add CLICK_ACTION_ZOOM
Add support for V2/3 CLICK_ACTION_ZOOM to llSetClickAction
---
OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 1 +
1 file changed, 1 insertion(+)
(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 60a7e14..62bd6b8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -612,6 +612,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int CLICK_ACTION_OPEN = 4;
public const int CLICK_ACTION_PLAY = 5;
public const int CLICK_ACTION_OPEN_MEDIA = 6;
+ public const int CLICK_ACTION_ZOOM = 7;
// constants for the llDetectedTouch* functions
public const int TOUCH_INVALID_FACE = -1;
--
cgit v1.1