aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs21
2 files changed, 23 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8815a28..41d1342 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2709,8 +2709,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2709 pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region. 2709 pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region.
2710 pos.x > (World.RegionInfo.RegionSizeX + 10) || // return FALSE if more than 10 meters into a east-adjacent region. 2710 pos.x > (World.RegionInfo.RegionSizeX + 10) || // return FALSE if more than 10 meters into a east-adjacent region.
2711 pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region. 2711 pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region.
2712 pos.y > (World.RegionInfo.RegionSizeY + 10) || // return FALSE if more than 10 meters into a north-adjacent region. 2712 pos.y > (World.RegionInfo.RegionSizeY + 10) // return FALSE if more than 10 meters into a north-adjacent region.
2713 pos.z > Constants.RegionHeight // return FALSE if altitude than 4096m
2714 ) 2713 )
2715 ) 2714 )
2716 { 2715 {
@@ -3609,9 +3608,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3609 3608
3610 float dist = (float)llVecDist(llGetPos(), pos); 3609 float dist = (float)llVecDist(llGetPos(), pos);
3611 3610
3612 if (dist > m_ScriptDistanceFactor * 10.0f)
3613 return;
3614
3615 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory); 3611 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory);
3616 3612
3617 if (item == null) 3613 if (item == null)
@@ -8182,16 +8178,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8182 { 8178 {
8183 if (buttons.Data[i].ToString() == String.Empty) 8179 if (buttons.Data[i].ToString() == String.Empty)
8184 { 8180 {
8185 Error("llDialog", "Button label cannot be blank"); 8181 Error("llDialog", "Button label cannot be blank.");
8186 return; 8182 return;
8187 } 8183 }
8188/*
8189 if (buttons.Data[i].ToString().Length > 24) 8184 if (buttons.Data[i].ToString().Length > 24)
8190 { 8185 {
8191 Error("llDialog", "Button label cannot be longer than 24 characters"); 8186 Error("llDialog", "Button label should not be longer than 24 characters.");
8192 return;
8193 } 8187 }
8194*/
8195 buts[i] = buttons.Data[i].ToString(); 8188 buts[i] = buttons.Data[i].ToString();
8196 } 8189 }
8197 8190
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index eb7049e..53bfa66 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -336,6 +336,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
336 private string CheckThreatLevelTest(ThreatLevel level, string function) 336 private string CheckThreatLevelTest(ThreatLevel level, string function)
337 { 337 {
338 FunctionPerms perms; 338 FunctionPerms perms;
339
340 // This test is coz the test system manages to call scripts without having them in items.
341 //// TODO - fix up the test system.
342 if ((null != m_item) && (null != m_item.OwnerID))
343 {
344 // Grid gods can do anything they damn well please.
345 if (World.Permissions.IsGridGod(m_item.OwnerID))
346 {
347 return String.Empty;
348 }
349 else
350 {
351 // So can active gods.
352 ScenePresence sp = World.GetScenePresence(m_item.OwnerID);
353 if (sp != null && !sp.IsDeleted && sp.IsGod)
354 return String.Empty;
355 }
356 }
357
339 if (!m_FunctionPerms.TryGetValue(function, out perms)) 358 if (!m_FunctionPerms.TryGetValue(function, out perms))
340 { 359 {
341 perms = new FunctionPerms(); 360 perms = new FunctionPerms();
@@ -5675,4 +5694,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5675 return 0; 5694 return 0;
5676 } 5695 }
5677 } 5696 }
5678} \ No newline at end of file 5697}