From 27b378ca8b6d035174b353734326dc8f4e6c70f7 Mon Sep 17 00:00:00 2001 From: "dr scofield (aka dirk husemann)" Date: Mon, 31 Aug 2009 17:25:16 +0200 Subject: [PATCH] switching Archiver to "new" region module scheme --- .../Resources/CoreModulePlugin.addin.xml | 1 + .../World/Archiver/ArchiverModule.cs | 30 +++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 88317910a5..383063d240 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -8,6 +8,7 @@ + diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index f7d170b031..f9b0225dcc 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -38,23 +38,41 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// This module loads and saves OpenSimulator region archives /// - public class ArchiverModule : IRegionModule, IRegionArchiverModule + public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = + LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; - public string Name { get { return "Region Archiver Module"; } } + public string Name + { + get { return "RegionArchiverModule"; } + } - public bool IsSharedModule { get { return false; } } + public Type ReplaceableInterface + { + get { return null; } + } - public void Initialise(Scene scene, IConfigSource source) + + public void Initialise(IConfigSource source) + { + m_log.Info("[ARCHIVER] Initialising"); + } + + public void AddRegion(Scene scene) { m_scene = scene; m_scene.RegisterModuleInterface(this); + m_log.InfoFormat("[ARCHIVER]: Enabled for region {0}", scene.RegionInfo.RegionName); } - public void PostInitialise() + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) { }