* Added a configuration option for allowing god script lsl methods.. such as llSetObjectPermMask. By default it's off.

0.6.0-stable
Teravus Ovares 2008-06-06 21:39:42 +00:00
parent 6a66caa02e
commit ed41ba8a3d
2 changed files with 31 additions and 19 deletions

View File

@ -31,6 +31,7 @@ using System.Collections.Generic;
using System.Runtime.Remoting.Lifetime;
using System.Text;
using System.Threading;
using Nini.Config;
using Axiom.Math;
using libsecondlife;
using OpenSim.Framework;
@ -5623,7 +5624,14 @@ namespace OpenSim.Region.ScriptEngine.Common
public void llSetObjectPermMask(int mask, int value)
{
m_host.AddScriptLPS(1);
IConfigSource config = new IniConfigSource(Application.iniFilePath);
if (config.Configs["LL-Functions"] == null)
config.AddConfig("LL-Functions");
if (config.Configs["LL-Functions"].GetBoolean("AllowGodFunctions", false))
{
if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID))
{
if (mask == BuiltIn_Commands_BaseClass.MASK_BASE)//0
{
m_host.BaseMask = (uint)value;
@ -5649,6 +5657,8 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.NextOwnerMask = (uint)value;
}
}
}
}
public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask)
{

View File

@ -487,6 +487,8 @@ CleanUpOldScriptsOnStartup=true
; Set the following to true to allow administrator owned scripts to execute console commands
AllowosConsoleCommand=false
AllowGodFunctions = false
; Maximum number of llListen events we allow per script
; Set this to 0 to have no limit imposed.
max_listens_per_script = 64