diff options
author | Teravus Ovares | 2008-06-06 21:39:42 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-06 21:39:42 +0000 |
commit | ed41ba8a3d9e19e9ff20fcdb6cdde3e614fcfb1f (patch) | |
tree | 085ad84a5f8c38318f732b57558561ff2a8acb97 /OpenSim | |
parent | revert 5028, as this approach to 1 nick per avatar isn't going to work, (diff) | |
download | opensim-SC_OLD-ed41ba8a3d9e19e9ff20fcdb6cdde3e614fcfb1f.zip opensim-SC_OLD-ed41ba8a3d9e19e9ff20fcdb6cdde3e614fcfb1f.tar.gz opensim-SC_OLD-ed41ba8a3d9e19e9ff20fcdb6cdde3e614fcfb1f.tar.bz2 opensim-SC_OLD-ed41ba8a3d9e19e9ff20fcdb6cdde3e614fcfb1f.tar.xz |
* Added a configuration option for allowing god script lsl methods.. such as llSetObjectPermMask. By default it's off.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 48 |
1 files changed, 29 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 | ||