mantis8341: fix MOD and LS apis configuration read from ossl file

0.9.1.0-post-fixes
UbitUmarov 2018-07-18 22:19:46 +01:00
parent 9278a9a9dd
commit 8c1c9129aa
2 changed files with 13 additions and 2 deletions

View File

@ -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<IScriptModuleComms>();

View File

@ -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<IScriptModuleComms>();