From 6e628f5c6a40e5f3457552950c003d3ac8487435 Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 10 Jun 2020 13:07:33 +0200 Subject: [PATCH] try an other way to register script commands --- src/DataValue.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/DataValue.cs b/src/DataValue.cs index e17fb58..085bb66 100644 --- a/src/DataValue.cs +++ b/src/DataValue.cs @@ -19,7 +19,7 @@ namespace OpenSim.Modules.DataValue { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DataValueModule")] - class DataValue : INonSharedRegionModule + public class DataValue : INonSharedRegionModule { #region Region Module private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -61,11 +61,11 @@ namespace OpenSim.Modules.DataValue m_dataValueDirectory = m_config.GetString("DataValueStorageDirectory", m_dataValueDirectory); m_enabled = m_config.GetBoolean("EnabledDataStorage", m_enabled); - m_log.DebugFormat("[" + Name + "]: Data storage: = " + m_dataValueDirectory); + m_log.Info("[" + Name + "]: Data storage = " + m_dataValueDirectory); } else { - m_log.DebugFormat("[" + Name + "]: Cant find config."); + m_log.Error("[" + Name + "]: Cant find config."); } } catch (Exception e) @@ -76,11 +76,11 @@ namespace OpenSim.Modules.DataValue if (m_enabled) { - m_log.InfoFormat("[" + Name + "]: module is enabled"); + m_log.Info("[" + Name + "]: module is enabled"); } else { - m_log.InfoFormat("[" + Name + "]: module is disabled"); + m_log.Info("[" + Name + "]: module is disabled"); } } @@ -89,6 +89,8 @@ namespace OpenSim.Modules.DataValue { if (m_enabled) { + m_log.Info("[" + Name + "]: Load region " + scene.Name); + m_scene = scene; m_scriptModule = m_scene.RequestModuleInterface(); if (m_scriptModule == null) @@ -100,7 +102,10 @@ namespace OpenSim.Modules.DataValue try { - m_scriptModule.RegisterScriptInvocations(this); + m_scriptModule.RegisterScriptInvocation(this, "osGetDataValue"); + m_scriptModule.RegisterScriptInvocation(this, "osSetDataValue"); + m_scriptModule.RegisterScriptInvocation(this, "osDeleteDataValue"); + m_scriptModule.RegisterScriptInvocation(this, "osCheckDataValue"); } catch (Exception e) {