aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
index 2b2da6f..6a09caf 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
@@ -108,6 +108,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
108 bool forceParcels = false; 108 bool forceParcels = false;
109 bool noObjects = false; 109 bool noObjects = false;
110 Vector3 displacement = new Vector3(0f, 0f, 0f); 110 Vector3 displacement = new Vector3(0f, 0f, 0f);
111 String defaultUser = "";
111 float rotation = 0f; 112 float rotation = 0f;
112 Vector3 rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0); 113 Vector3 rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0);
113 114
@@ -119,6 +120,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
119 options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); }); 120 options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); });
120 options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); }); // downward compatibility 121 options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); }); // downward compatibility
121 options.Add("no-objects", delegate (string v) { noObjects = (v != null); }); 122 options.Add("no-objects", delegate (string v) { noObjects = (v != null); });
123 options.Add("default-user=", delegate(string v) { defaultUser = (v == null) ? "" : v; });
122 options.Add("displacement=", delegate (string v) { 124 options.Add("displacement=", delegate (string v) {
123 try 125 try
124 { 126 {
@@ -131,7 +133,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
131 return; 133 return;
132 } 134 }
133 }); 135 });
134 options.Add("rotation=", delegate (string v) { 136 options.Add("rotation=", delegate(string v)
137 {
135 try 138 try
136 { 139 {
137 rotation = v == null ? 0f : float.Parse(v); 140 rotation = v == null ? 0f : float.Parse(v);
@@ -181,6 +184,27 @@ namespace OpenSim.Region.CoreModules.World.Archiver
181 if (forceTerrain) archiveOptions.Add("force-terrain", null); 184 if (forceTerrain) archiveOptions.Add("force-terrain", null);
182 if (forceParcels) archiveOptions.Add("force-parcels", null); 185 if (forceParcels) archiveOptions.Add("force-parcels", null);
183 if (noObjects) archiveOptions.Add("no-objects", null); 186 if (noObjects) archiveOptions.Add("no-objects", null);
187 if (defaultUser != "")
188 {
189 UUID defaultUserUUID = UUID.Zero;
190 try
191 {
192 defaultUserUUID = Scene.UserManagementModule.GetUserIdByName(defaultUser);
193 }
194 catch
195 {
196 m_log.ErrorFormat("[ARCHIVER MODULE] default user must be in format \"First Last\"", defaultUser);
197 }
198 if (defaultUserUUID == UUID.Zero)
199 {
200 m_log.ErrorFormat("[ARCHIVER MODULE] cannot find specified default user {0}", defaultUser);
201 return;
202 }
203 else
204 {
205 archiveOptions.Add("default-user", defaultUserUUID);
206 }
207 }
184 archiveOptions.Add("displacement", displacement); 208 archiveOptions.Add("displacement", displacement);
185 archiveOptions.Add("rotation", rotation); 209 archiveOptions.Add("rotation", rotation);
186 archiveOptions.Add("rotation-center", rotationCenter); 210 archiveOptions.Add("rotation-center", rotationCenter);