mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
Implement osForceCreateLink() and osForceBreakLink()
These are identical to llCreateLink() and llBreakLink() except that they don't require script permissions. However, osForceCreateLink() still requires that linked and linkee still have the same owner. There's also an AutomaticLinkPermission setting in [XEngine] that could be set to true to prevent the LSL function checks. But this doesn't allow the finer control over which users/scripts, etc. can do this that the OSSL functions provide.
This commit is contained in:
@@ -2330,6 +2330,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return retVal;
|
||||
}
|
||||
|
||||
public void osForceCreateLink(string target, int parent)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryLow, "osForceCreateLink");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
InitLSL();
|
||||
((LSL_Api)m_LSL_Api).CreateLink(target, parent);
|
||||
}
|
||||
|
||||
public void osForceBreakLink(int linknum)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryLow, "osForceBreakLink");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
InitLSL();
|
||||
((LSL_Api)m_LSL_Api).BreakLink(linknum);
|
||||
}
|
||||
|
||||
public LSL_Integer osIsNpc(LSL_Key npc)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.None, "osIsNpc");
|
||||
|
||||
Reference in New Issue
Block a user