diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 8d4f91b..181f4c6 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -45,6 +45,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
45 | 45 | ||
46 | private Scene m_scene; | 46 | private Scene m_scene; |
47 | 47 | ||
48 | /// <value> | ||
49 | /// The file used to load and save an opensimulator archive if no filename has been specified | ||
50 | /// </value> | ||
51 | protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; | ||
52 | |||
48 | public string Name | 53 | public string Name |
49 | { | 54 | { |
50 | get { return "RegionArchiverModule"; } | 55 | get { return "RegionArchiverModule"; } |
@@ -80,6 +85,38 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
80 | { | 85 | { |
81 | } | 86 | } |
82 | 87 | ||
88 | /// <summary> | ||
89 | /// Load a whole region from an opensimulator archive. | ||
90 | /// </summary> | ||
91 | /// <param name="cmdparams"></param> | ||
92 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) | ||
93 | { | ||
94 | if (cmdparams.Length > 2) | ||
95 | { | ||
96 | DearchiveRegion(cmdparams[2]); | ||
97 | } | ||
98 | else | ||
99 | { | ||
100 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME); | ||
101 | } | ||
102 | } | ||
103 | |||
104 | /// <summary> | ||
105 | /// Save a region to a file, including all the assets needed to restore it. | ||
106 | /// </summary> | ||
107 | /// <param name="cmdparams"></param> | ||
108 | public void HandleSaveOarConsoleCommand(string module, string[] cmdparams) | ||
109 | { | ||
110 | if (cmdparams.Length > 2) | ||
111 | { | ||
112 | ArchiveRegion(cmdparams[2]); | ||
113 | } | ||
114 | else | ||
115 | { | ||
116 | ArchiveRegion(DEFAULT_OAR_BACKUP_FILENAME); | ||
117 | } | ||
118 | } | ||
119 | |||
83 | public void ArchiveRegion(string savePath) | 120 | public void ArchiveRegion(string savePath) |
84 | { | 121 | { |
85 | ArchiveRegion(savePath, Guid.Empty); | 122 | ArchiveRegion(savePath, Guid.Empty); |