diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 7d1fe68..f4f9e2d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -35,23 +35,22 @@ using Nini.Config; | |||
35 | using OpenMetaverse; | 35 | using OpenMetaverse; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Communications; | 37 | using OpenSim.Framework.Communications; |
38 | using OpenSim.Framework.Console; | ||
38 | using OpenSim.Region.Framework.Interfaces; | 39 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Services.Interfaces; | 41 | using OpenSim.Services.Interfaces; |
42 | using Mono.Addins; | ||
41 | 43 | ||
42 | namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | 44 | namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver |
43 | { | 45 | { |
44 | /// <summary> | 46 | /// <summary> |
45 | /// This module loads and saves OpenSimulator inventory archives | 47 | /// This module loads and saves OpenSimulator inventory archives |
46 | /// </summary> | 48 | /// </summary> |
47 | public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule | 49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "InventoryArchiverModule")] |
50 | public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule | ||
48 | { | 51 | { |
49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 53 | ||
51 | public string Name { get { return "Inventory Archiver Module"; } } | ||
52 | |||
53 | public bool IsSharedModule { get { return true; } } | ||
54 | |||
55 | /// <value> | 54 | /// <value> |
56 | /// Enable or disable checking whether the iar user is actually logged in | 55 | /// Enable or disable checking whether the iar user is actually logged in |
57 | /// </value> | 56 | /// </value> |
@@ -98,9 +97,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
98 | // public InventoryArchiverModule(bool disablePresenceChecks) | 97 | // public InventoryArchiverModule(bool disablePresenceChecks) |
99 | // { | 98 | // { |
100 | // DisablePresenceChecks = disablePresenceChecks; | 99 | // DisablePresenceChecks = disablePresenceChecks; |
101 | // } | 100 | // } |
101 | |||
102 | #region ISharedRegionModule | ||
103 | |||
104 | public void Initialise(IConfigSource source) | ||
105 | { | ||
106 | } | ||
102 | 107 | ||
103 | public void Initialise(Scene scene, IConfigSource source) | 108 | public void AddRegion(Scene scene) |
104 | { | 109 | { |
105 | if (m_scenes.Count == 0) | 110 | if (m_scenes.Count == 0) |
106 | { | 111 | { |
@@ -143,10 +148,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
143 | m_scenes[scene.RegionInfo.RegionID] = scene; | 148 | m_scenes[scene.RegionInfo.RegionID] = scene; |
144 | } | 149 | } |
145 | 150 | ||
146 | public void PostInitialise() {} | 151 | public void RemoveRegion(Scene scene) |
152 | { | ||
153 | } | ||
147 | 154 | ||
148 | public void Close() {} | 155 | public void Close() {} |
149 | 156 | ||
157 | public void RegionLoaded(Scene scene) | ||
158 | { | ||
159 | } | ||
160 | |||
161 | public void PostInitialise() | ||
162 | { | ||
163 | } | ||
164 | |||
165 | public Type ReplaceableInterface | ||
166 | { | ||
167 | get { return null; } | ||
168 | } | ||
169 | |||
170 | public string Name { get { return "Inventory Archiver Module"; } } | ||
171 | |||
172 | #endregion | ||
173 | |||
150 | /// <summary> | 174 | /// <summary> |
151 | /// Trigger the inventory archive saved event. | 175 | /// Trigger the inventory archive saved event. |
152 | /// </summary> | 176 | /// </summary> |
@@ -209,6 +233,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
209 | Guid id, string firstName, string lastName, string invPath, string pass, string savePath, | 233 | Guid id, string firstName, string lastName, string invPath, string pass, string savePath, |
210 | Dictionary<string, object> options) | 234 | Dictionary<string, object> options) |
211 | { | 235 | { |
236 | // if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, savePath)) | ||
237 | // return false; | ||
238 | |||
212 | if (m_scenes.Count > 0) | 239 | if (m_scenes.Count > 0) |
213 | { | 240 | { |
214 | UserAccount userInfo = GetUserInfo(firstName, lastName, pass); | 241 | UserAccount userInfo = GetUserInfo(firstName, lastName, pass); |