From a87a247f0548d39a8c39b1d28123d7da8db44598 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 29 Jan 2010 07:20:13 +0000 Subject: Revert "Updates all IRegionModules to the new style region modules." This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf. --- .../ContentManagementModule.cs | 47 +++++++++------------- 1 file changed, 18 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs') diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs index 6769d59..3d1c346 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -38,7 +38,6 @@ using System.Threading; using OpenMetaverse; -using Mono.Addins; using Nini.Config; using OpenSim; @@ -51,8 +50,7 @@ using log4net; namespace OpenSim.Region.OptionalModules.ContentManagement { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class ContentManagementModule : ISharedRegionModule + public class ContentManagementModule : IRegionModule { #region Static Fields @@ -62,20 +60,22 @@ namespace OpenSim.Region.OptionalModules.ContentManagement #region Fields - private bool initialised = false; - private CMController m_control = null; - private bool m_enabled = false; - private CMModel m_model = null; - private bool m_posted = false; - private CMView m_view = null; - private string databaseDir = "./"; - private string database = "FileSystemDatabase"; - private int channel = 345; + bool initialised = false; + CMController m_control = null; + bool m_enabled = false; + CMModel m_model = null; + bool m_posted = false; + CMView m_view = null; #endregion Fields #region Public Properties + public bool IsSharedModule + { + get { return true; } + } + public string Name { get { return "ContentManagementModule"; } @@ -89,8 +89,11 @@ namespace OpenSim.Region.OptionalModules.ContentManagement { } - public void Initialise(IConfigSource source) + public void Initialise(Scene scene, IConfigSource source) { + string databaseDir = "./"; + string database = "FileSystemDatabase"; + int channel = 345; try { if (source.Configs["CMS"] == null) @@ -112,15 +115,13 @@ namespace OpenSim.Region.OptionalModules.ContentManagement m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e); m_enabled = false; } - } - public void AddRegion(Scene scene) - { if (!m_enabled) { m_log.Info("[Content Management]: Content Management System is not Enabled."); return; } + lock (this) { if (!initialised) //only init once @@ -141,18 +142,6 @@ namespace OpenSim.Region.OptionalModules.ContentManagement } } } - public void RegionLoaded(Scene scene) - { - } - - public void RemoveRegion(Scene scene) - { - } - - public Type ReplaceableInterface - { - get { return null; } - } public void PostInitialise() { -- cgit v1.1