diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 238fefbe75..1979012b8b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs @@ -61,6 +61,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api internal SceneObjectPart m_host; internal bool m_LSFunctionsEnabled = false; internal IScriptModuleComms m_comms = null; + internal IConfig m_osslconfig; public void Initialize( IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item) @@ -68,7 +69,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_ScriptEngine = scriptEngine; m_host = host; - if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false)) + m_osslconfig = m_ScriptEngine.ConfigSource.Configs["OSSL"]; + if(m_osslconfig == null) + m_osslconfig = m_ScriptEngine.Config; + + if (m_osslconfig.GetBoolean("AllowLightShareFunctions", false)) m_LSFunctionsEnabled = true; m_comms = m_ScriptEngine.World.RequestModuleInterface(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 692bec075e..b73a1418f4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs @@ -64,6 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api internal TaskInventoryItem m_item; internal bool m_MODFunctionsEnabled = false; internal IScriptModuleComms m_comms = null; + internal IConfig m_osslconfig; public void Initialize( IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item) @@ -72,7 +73,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host = host; m_item = item; - if (m_ScriptEngine.Config.GetBoolean("AllowMODFunctions", false)) + + m_osslconfig = m_ScriptEngine.ConfigSource.Configs["OSSL"]; + if(m_osslconfig == null) + m_osslconfig = m_ScriptEngine.Config; + + if (m_osslconfig.GetBoolean("AllowMODFunctions", false)) m_MODFunctionsEnabled = true; m_comms = m_ScriptEngine.World.RequestModuleInterface();