diff options
author | Charles Krinke | 2008-02-18 03:14:31 +0000 |
---|---|---|
committer | Charles Krinke | 2008-02-18 03:14:31 +0000 |
commit | 3df36523cb8814b71b8327c19185d73075ee41dc (patch) | |
tree | c0204f72d5fbdc1764275a45e32bb4f816eecf19 /OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |
parent | ODE: Tired of floating above the ground after crossing a border? Boy have I ... (diff) | |
download | opensim-SC-3df36523cb8814b71b8327c19185d73075ee41dc.zip opensim-SC-3df36523cb8814b71b8327c19185d73075ee41dc.tar.gz opensim-SC-3df36523cb8814b71b8327c19185d73075ee41dc.tar.bz2 opensim-SC-3df36523cb8814b71b8327c19185d73075ee41dc.tar.xz |
Thank you very much, Hashbox for:
Changed the public IsAdministrator back to protected,
now checks Config to see whether it is allowed to run or not.
Defaults to false (not allowed).
To use add the following to OpenSim.ini
[LL-Functions]
AllowosConsoleCommand=true
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index a7d4ecf..c07f6d7 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -3676,14 +3676,21 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3676 | return LLUUID.Zero.ToString(); | 3676 | return LLUUID.Zero.ToString(); |
3677 | } | 3677 | } |
3678 | 3678 | ||
3679 | public int osConsoleCommand(string Command) | 3679 | public bool osConsoleCommand(string Command) |
3680 | { | 3680 | { |
3681 | if (World.PermissionsMngr.IsAdministrator(m_host.OwnerID)) { | 3681 | m_host.AddScriptLPS(1); |
3682 | OpenSim.Framework.Console.MainConsole.Instance.RunCommand(Command); | 3682 | Nini.Config.IConfigSource config = new Nini.Config.IniConfigSource(Application.iniFilePath); |
3683 | return 1; | 3683 | if (config.Configs["LL-Functions"] == null) |
3684 | } else { | 3684 | config.AddConfig("LL-Functions"); |
3685 | return 0; | 3685 | |
3686 | if (config.Configs["LL-Functions"].GetBoolean("AllowosConsoleCommand", false)) { | ||
3687 | if (World.PermissionsMngr.CanRunConsoleCommand(m_host.OwnerID)) { | ||
3688 | OpenSim.Framework.Console.MainConsole.Instance.RunCommand(Command); | ||
3689 | return true; | ||
3690 | } | ||
3691 | return false; | ||
3686 | } | 3692 | } |
3693 | return false; | ||
3687 | } | 3694 | } |
3688 | 3695 | ||
3689 | private void NotImplemented(string Command) | 3696 | private void NotImplemented(string Command) |