aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-03-12 23:54:20 +0000
committerJustin Clark-Casey (justincc)2014-03-12 23:54:20 +0000
commit6a279feb2fdd9f85876b6533fed1020fdbffc20a (patch)
tree4b5afa819a8b7ee32a4e8db95eab9dce61082d0d /OpenSim/Region/ScriptEngine/Shared/Api
parentImplement osForceCreateLink() and osForceBreakLink() (diff)
downloadopensim-SC-6a279feb2fdd9f85876b6533fed1020fdbffc20a.zip
opensim-SC-6a279feb2fdd9f85876b6533fed1020fdbffc20a.tar.gz
opensim-SC-6a279feb2fdd9f85876b6533fed1020fdbffc20a.tar.bz2
opensim-SC-6a279feb2fdd9f85876b6533fed1020fdbffc20a.tar.xz
Only allow llBreakAllLinks() to work if script has received PERMISSION_CHANGE_LINKS
As per http://wiki.secondlife.com/wiki/LlBreakAllLinks Same as existing llCreateLink() and llBreakLink()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 45a7c96..abd8123 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3922,6 +3922,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3922 public void llBreakAllLinks() 3922 public void llBreakAllLinks()
3923 { 3923 {
3924 m_host.AddScriptLPS(1); 3924 m_host.AddScriptLPS(1);
3925
3926 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0
3927 && !m_automaticLinkPermission)
3928 {
3929 Error("llBreakAllLinks", "PERMISSION_CHANGE_LINKS permission not set");
3930 return;
3931 }
3932
3925 SceneObjectGroup parentPrim = m_host.ParentGroup; 3933 SceneObjectGroup parentPrim = m_host.ParentGroup;
3926 if (parentPrim.AttachmentPoint != 0) 3934 if (parentPrim.AttachmentPoint != 0)
3927 return; // Fail silently if attached 3935 return; // Fail silently if attached