mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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()
This commit is contained in:
@@ -3922,6 +3922,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public void llBreakAllLinks()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0
|
||||
&& !m_automaticLinkPermission)
|
||||
{
|
||||
Error("llBreakAllLinks", "PERMISSION_CHANGE_LINKS permission not set");
|
||||
return;
|
||||
}
|
||||
|
||||
SceneObjectGroup parentPrim = m_host.ParentGroup;
|
||||
if (parentPrim.AttachmentPoint != 0)
|
||||
return; // Fail silently if attached
|
||||
|
||||
Reference in New Issue
Block a user