30 using System.Reflection;
31 using System.Threading;
34 using System.Net.Sockets;
38 using OpenMetaverse.StructuredData;
39 using OpenSim.Framework;
40 using OpenSim.Region.Framework.Interfaces;
41 using OpenSim.Region.Framework.Scenes;
42 using System.Collections.Generic;
43 using System.Text.RegularExpressions;
45 namespace OpenSim.
Region.OptionalModules.Scripting.JsonStore
47 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"JsonStoreCommandsModule")]
51 private static readonly ILog m_log =
52 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
54 private IConfig m_config = null;
55 private bool m_enabled =
false;
57 private Scene m_scene = null;
61 #region Region Module interface
70 get {
return this.GetType().Name; }
84 if ((m_config = config.Configs[
"JsonStore"]) == null)
91 m_enabled = m_config.GetBoolean(
"Enabled", m_enabled);
95 m_log.Error(
"[JsonStore]: initialization error: {0}", e);
100 m_log.DebugFormat(
"[JsonStore]: module is enabled");
159 m_log.ErrorFormat(
"[JsonStoreCommands]: JsonModule interface not defined");
164 scene.AddCommand(
"JsonStore",
this,
"jsonstore stats",
"jsonstore stats",
165 "Display statistics about the state of the JsonStore module",
"",
174 public Type ReplaceableInterface
183 private void CmdStats(
string module,
string[] cmd)
189 MainConsole.Instance.OutputFormat(
"{0}\t{1}",m_scene.RegionInfo.RegionName,stats.StoreCount);
void Initialise(IConfigSource config)
Initialise this shared module
void Close()
Nothing to do on close
void RemoveRegion(Scene scene)
void PostInitialise()
everything is loaded, perform post load configuration
static ICommandConsole Instance
void RegionLoaded(Scene scene)
Called when all modules have been added for a region. This is where we hook up events ...
void AddRegion(Scene scene)