diff options
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 48 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 2 |
2 files changed, 31 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 1999945..68b87fd 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Runtime.Remoting.Lifetime; | 31 | using System.Runtime.Remoting.Lifetime; |
32 | using System.Text; | 32 | using System.Text; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using Nini.Config; | ||
34 | using Axiom.Math; | 35 | using Axiom.Math; |
35 | using libsecondlife; | 36 | using libsecondlife; |
36 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
@@ -5623,30 +5624,39 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5623 | public void llSetObjectPermMask(int mask, int value) | 5624 | public void llSetObjectPermMask(int mask, int value) |
5624 | { | 5625 | { |
5625 | m_host.AddScriptLPS(1); | 5626 | m_host.AddScriptLPS(1); |
5626 | 5627 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | |
5627 | if (mask == BuiltIn_Commands_BaseClass.MASK_BASE)//0 | 5628 | if (config.Configs["LL-Functions"] == null) |
5629 | config.AddConfig("LL-Functions"); | ||
5630 | |||
5631 | if (config.Configs["LL-Functions"].GetBoolean("AllowGodFunctions", false)) | ||
5628 | { | 5632 | { |
5629 | m_host.BaseMask = (uint)value; | 5633 | if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID)) |
5630 | } | 5634 | { |
5635 | if (mask == BuiltIn_Commands_BaseClass.MASK_BASE)//0 | ||
5636 | { | ||
5637 | m_host.BaseMask = (uint)value; | ||
5638 | } | ||
5631 | 5639 | ||
5632 | else if (mask == BuiltIn_Commands_BaseClass.MASK_OWNER)//1 | 5640 | else if (mask == BuiltIn_Commands_BaseClass.MASK_OWNER)//1 |
5633 | { | 5641 | { |
5634 | m_host.OwnerMask = (uint)value; | 5642 | m_host.OwnerMask = (uint)value; |
5635 | } | 5643 | } |
5636 | 5644 | ||
5637 | else if (mask == BuiltIn_Commands_BaseClass.MASK_GROUP)//2 | 5645 | else if (mask == BuiltIn_Commands_BaseClass.MASK_GROUP)//2 |
5638 | { | 5646 | { |
5639 | m_host.GroupMask = (uint)value; | 5647 | m_host.GroupMask = (uint)value; |
5640 | } | 5648 | } |
5641 | 5649 | ||
5642 | else if (mask == BuiltIn_Commands_BaseClass.MASK_EVERYONE)//3 | 5650 | else if (mask == BuiltIn_Commands_BaseClass.MASK_EVERYONE)//3 |
5643 | { | 5651 | { |
5644 | m_host.EveryoneMask = (uint)value; | 5652 | m_host.EveryoneMask = (uint)value; |
5645 | } | 5653 | } |
5646 | 5654 | ||
5647 | else if (mask == BuiltIn_Commands_BaseClass.MASK_NEXT)//4 | 5655 | else if (mask == BuiltIn_Commands_BaseClass.MASK_NEXT)//4 |
5648 | { | 5656 | { |
5649 | m_host.NextOwnerMask = (uint)value; | 5657 | m_host.NextOwnerMask = (uint)value; |
5658 | } | ||
5659 | } | ||
5650 | } | 5660 | } |
5651 | } | 5661 | } |
5652 | 5662 | ||
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index db0b3a9..0682a3e 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -487,6 +487,8 @@ CleanUpOldScriptsOnStartup=true | |||
487 | ; Set the following to true to allow administrator owned scripts to execute console commands | 487 | ; Set the following to true to allow administrator owned scripts to execute console commands |
488 | AllowosConsoleCommand=false | 488 | AllowosConsoleCommand=false |
489 | 489 | ||
490 | AllowGodFunctions = false | ||
491 | |||
490 | ; Maximum number of llListen events we allow per script | 492 | ; Maximum number of llListen events we allow per script |
491 | ; Set this to 0 to have no limit imposed. | 493 | ; Set this to 0 to have no limit imposed. |
492 | max_listens_per_script = 64 | 494 | max_listens_per_script = 64 |