mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
fix llRemoteLoadScriptPin permissions
This commit is contained in:
@@ -8168,19 +8168,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||||||
Error("llRemoteLoadScriptPin", "Can't find script '" + name + "'");
|
Error("llRemoteLoadScriptPin", "Can't find script '" + name + "'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ((item.BasePermissions & (uint)PermissionMask.Copy) == 0)
|
||||||
SceneObjectPart dest = World.GetSceneObjectPart(destId);
|
|
||||||
if (dest != null)
|
|
||||||
{
|
{
|
||||||
if ((item.BasePermissions & (uint)PermissionMask.Transfer) != 0 || dest.ParentGroup.RootPart.OwnerID == m_host.ParentGroup.RootPart.OwnerID)
|
Error("llRemoteLoadScriptPin", "No copy rights");
|
||||||
{
|
return;
|
||||||
// the rest of the permission checks are done in RezScript, so check the pin there as well
|
|
||||||
World.RezScriptFromPrim(item.ItemID, m_host, destId, pin, running, start_param);
|
|
||||||
|
|
||||||
if ((item.BasePermissions & (uint)PermissionMask.Copy) == 0)
|
|
||||||
m_host.Inventory.RemoveInventoryItem(item.ItemID);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the rest of the permission checks are done in RezScript, so check the pin there as well
|
||||||
|
World.RezScriptFromPrim(item.ItemID, m_host, destId, pin, running, start_param);
|
||||||
|
|
||||||
// this will cause the delay even if the script pin or permissions were wrong - seems ok
|
// this will cause the delay even if the script pin or permissions were wrong - seems ok
|
||||||
ScriptSleep(m_sleepMsOnRemoteLoadScriptPin);
|
ScriptSleep(m_sleepMsOnRemoteLoadScriptPin);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EventParams
|
public class EventParams
|
||||||
{
|
{
|
||||||
public EventParams(string eventName, Object[] eventParams, DetectParams[] detectParams)
|
public EventParams(string eventName, object[] eventParams, DetectParams[] detectParams)
|
||||||
{
|
{
|
||||||
EventName = eventName;
|
EventName = eventName;
|
||||||
Params = eventParams;
|
Params = eventParams;
|
||||||
@@ -324,7 +324,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
|||||||
}
|
}
|
||||||
|
|
||||||
public string EventName;
|
public string EventName;
|
||||||
public Object[] Params;
|
public object[] Params;
|
||||||
public DetectParams[] DetectParams;
|
public DetectParams[] DetectParams;
|
||||||
|
|
||||||
|
public static EventParams StateEntryParams = new EventParams("state_entry", new object[0], new DetectParams[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user