diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 44 |
1 files changed, 25 insertions, 19 deletions
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; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using log4net; | 31 | using log4net; |
32 | using Mono.Addins; | ||
32 | using Nini.Config; | 33 | using Nini.Config; |
33 | using OpenMetaverse; | 34 | using OpenMetaverse; |
34 | using OpenMetaverse.Packets; | 35 | using OpenMetaverse.Packets; |
@@ -39,38 +40,43 @@ using OpenSim.Region.Framework.Scenes; | |||
39 | 40 | ||
40 | namespace OpenSim.Region.CoreModules.Avatar.Attachments | 41 | namespace OpenSim.Region.CoreModules.Avatar.Attachments |
41 | { | 42 | { |
42 | public class AttachmentsModule : IAttachmentsModule, IRegionModule | 43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AttachmentsModule")] |
44 | public class AttachmentsModule : IAttachmentsModule, INonSharedRegionModule | ||
43 | { | 45 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 47 | ||
46 | protected Scene m_scene = null; | 48 | protected Scene m_scene = null; |
49 | |||
50 | public string Name { get { return "Attachments Module"; } } | ||
51 | public Type ReplaceableInterface { get { return null; } } | ||
47 | 52 | ||
48 | public void Initialise(Scene scene, IConfigSource source) | 53 | public void Initialise(IConfigSource source) {} |
54 | |||
55 | public void AddRegion(Scene scene) | ||
49 | { | 56 | { |
50 | scene.RegisterModuleInterface<IAttachmentsModule>(this); | ||
51 | m_scene = scene; | 57 | m_scene = scene; |
58 | m_scene.RegisterModuleInterface<IAttachmentsModule>(this); | ||
52 | } | 59 | } |
53 | 60 | ||
54 | public void PostInitialise() | 61 | public void RemoveRegion(Scene scene) |
55 | { | ||
56 | } | ||
57 | |||
58 | public void Close() | ||
59 | { | ||
60 | } | ||
61 | |||
62 | public string Name | ||
63 | { | 62 | { |
64 | get { return "Attachments Module"; } | 63 | m_scene.UnregisterModuleInterface<IAttachmentsModule>(this); |
65 | } | 64 | } |
66 | 65 | ||
67 | public bool IsSharedModule | 66 | public void RegionLoaded(Scene scene) {} |
67 | |||
68 | public void Close() | ||
68 | { | 69 | { |
69 | get { return false; } | 70 | RemoveRegion(m_scene); |
70 | } | 71 | } |
71 | 72 | ||
72 | // Called by client | 73 | /// <summary> |
73 | // | 74 | /// Called by client |
75 | /// </summary> | ||
76 | /// <param name="remoteClient"></param> | ||
77 | /// <param name="objectLocalID"></param> | ||
78 | /// <param name="AttachmentPt"></param> | ||
79 | /// <param name="silent"></param> | ||
74 | public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent) | 80 | public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent) |
75 | { | 81 | { |
76 | m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject"); | 82 | m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject"); |