diff options
author | Revolution | 2010-01-22 18:09:33 -0600 |
---|---|---|
committer | Melanie | 2010-01-23 15:18:52 +0000 |
commit | ec3c31e61e5e540f822891110df9bc978655bbaf (patch) | |
tree | b0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver | |
parent | add a target position to agent updates to ScenePresence to support alternativ... (diff) | |
download | opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.zip opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2 opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz |
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index ecd60bd..a04ab22 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -30,6 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using log4net; |
33 | using Mono.Addins; | ||
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using OpenMetaverse; | 35 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
@@ -41,10 +42,11 @@ using OpenSim.Services.Interfaces; | |||
41 | 42 | ||
42 | namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | 43 | namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver |
43 | { | 44 | { |
45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | ||
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 | public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule |
48 | { | 50 | { |
49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 52 | ||
@@ -82,18 +84,28 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
82 | DisablePresenceChecks = disablePresenceChecks; | 84 | DisablePresenceChecks = disablePresenceChecks; |
83 | } | 85 | } |
84 | 86 | ||
85 | public void Initialise(Scene scene, IConfigSource source) | 87 | public void Initialise(IConfigSource source) |
88 | { | ||
89 | |||
90 | } | ||
91 | |||
92 | public Type ReplaceableInterface | ||
93 | { | ||
94 | get { return null; } | ||
95 | } | ||
96 | |||
97 | public void AddRegion(Scene scene) | ||
86 | { | 98 | { |
87 | if (m_scenes.Count == 0) | 99 | if (m_scenes.Count == 0) |
88 | { | 100 | { |
89 | scene.RegisterModuleInterface<IInventoryArchiverModule>(this); | 101 | scene.RegisterModuleInterface<IInventoryArchiverModule>(this); |
90 | OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted; | 102 | OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted; |
91 | 103 | ||
92 | scene.AddCommand( | 104 | scene.AddCommand( |
93 | this, "load iar", | 105 | this, "load iar", |
94 | "load iar <first> <last> <inventory path> <password> [<archive path>]", | 106 | "load iar <first> <last> <inventory path> <password> [<archive path>]", |
95 | "Load user inventory archive.", HandleLoadInvConsoleCommand); | 107 | "Load user inventory archive.", HandleLoadInvConsoleCommand); |
96 | 108 | ||
97 | scene.AddCommand( | 109 | scene.AddCommand( |
98 | this, "save iar", | 110 | this, "save iar", |
99 | "save iar <first> <last> <inventory path> <password> [<archive path>]", | 111 | "save iar <first> <last> <inventory path> <password> [<archive path>]", |
@@ -101,10 +113,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
101 | 113 | ||
102 | m_aScene = scene; | 114 | m_aScene = scene; |
103 | } | 115 | } |
104 | 116 | ||
105 | m_scenes[scene.RegionInfo.RegionID] = scene; | 117 | m_scenes[scene.RegionInfo.RegionID] = scene; |
106 | } | 118 | } |
107 | 119 | ||
120 | public void RegionLoaded(Scene scene) | ||
121 | { | ||
122 | } | ||
123 | |||
124 | public void RemoveRegion(Scene scene) | ||
125 | { | ||
126 | scene.UnregisterModuleInterface<IInventoryArchiverModule>(this); | ||
127 | if(m_scenes.ContainsKey(scene.RegionInfo.RegionID)) | ||
128 | m_scenes.Remove(scene.RegionInfo.RegionID); | ||
129 | } | ||
130 | |||
108 | public void PostInitialise() {} | 131 | public void PostInitialise() {} |
109 | 132 | ||
110 | public void Close() {} | 133 | public void Close() {} |