diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index 1077f4a..7012037 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using Mono.Addins; | ||
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -35,7 +36,8 @@ using OpenSim.Region.Framework.Scenes; | |||
35 | 36 | ||
36 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | 37 | namespace OpenSim.Region.CoreModules.Agent.AssetTransaction |
37 | { | 38 | { |
38 | public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions | 39 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
40 | public class AssetTransactionModule : ISharedRegionModule, IAgentAssetTransactions | ||
39 | { | 41 | { |
40 | private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>(); | 42 | private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>(); |
41 | private bool m_dumpAssetsToFile = false; | 43 | private bool m_dumpAssetsToFile = false; |
@@ -59,9 +61,14 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
59 | //m_log.Debug("creating AgentAssetTransactionModule"); | 61 | //m_log.Debug("creating AgentAssetTransactionModule"); |
60 | } | 62 | } |
61 | 63 | ||
62 | #region IRegionModule Members | 64 | #region ISharedRegionModule Members |
63 | 65 | ||
64 | public void Initialise(Scene scene, IConfigSource config) | 66 | public void Initialise(IConfigSource config) |
67 | { | ||
68 | |||
69 | } | ||
70 | |||
71 | public void AddRegion(Scene scene) | ||
65 | { | 72 | { |
66 | if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) | 73 | if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) |
67 | { | 74 | { |
@@ -79,6 +86,23 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
79 | m_scene = scene; | 86 | m_scene = scene; |
80 | } | 87 | } |
81 | 88 | ||
89 | public Type ReplaceableInterface | ||
90 | { | ||
91 | get { return null; } | ||
92 | } | ||
93 | |||
94 | public void RegionLoaded(Scene scene) | ||
95 | { | ||
96 | } | ||
97 | |||
98 | public void RemoveRegion(Scene scene) | ||
99 | { | ||
100 | if (RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) | ||
101 | RegisteredScenes.Remove(scene.RegionInfo.RegionID); | ||
102 | scene.UnregisterModuleInterface<IAgentAssetTransactions>(this); | ||
103 | scene.EventManager.OnNewClient -= NewClient; | ||
104 | } | ||
105 | |||
82 | public void PostInitialise() | 106 | public void PostInitialise() |
83 | { | 107 | { |
84 | } | 108 | } |
@@ -92,11 +116,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
92 | get { return "AgentTransactionModule"; } | 116 | get { return "AgentTransactionModule"; } |
93 | } | 117 | } |
94 | 118 | ||
95 | public bool IsSharedModule | ||
96 | { | ||
97 | get { return true; } | ||
98 | } | ||
99 | |||
100 | #endregion | 119 | #endregion |
101 | 120 | ||
102 | public void NewClient(IClientAPI client) | 121 | public void NewClient(IClientAPI client) |