From 5b80e3fc18bdb21a689c1806480714dbfff4200e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Jul 2010 19:26:54 +0100 Subject: convert attachments module from old region module style to new --- .../Avatar/Attachments/AttachmentsModule.cs | 44 ++++++++++++---------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index ff3036a..1187e91 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.Packets; @@ -39,38 +40,43 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.Attachments { - public class AttachmentsModule : IAttachmentsModule, IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AttachmentsModule")] + public class AttachmentsModule : IAttachmentsModule, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Scene m_scene = null; + + public string Name { get { return "Attachments Module"; } } + public Type ReplaceableInterface { get { return null; } } - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) {} + + public void AddRegion(Scene scene) { - scene.RegisterModuleInterface(this); m_scene = scene; + m_scene.RegisterModuleInterface(this); } - - public void PostInitialise() - { - } - - public void Close() - { - } - - public string Name + + public void RemoveRegion(Scene scene) { - get { return "Attachments Module"; } + m_scene.UnregisterModuleInterface(this); } - - public bool IsSharedModule + + public void RegionLoaded(Scene scene) {} + + public void Close() { - get { return false; } + RemoveRegion(m_scene); } - // Called by client - // + /// + /// Called by client + /// + /// + /// + /// + /// public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent) { m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject"); -- cgit v1.1