aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
authorKittoFlora2009-11-16 01:40:15 +0100
committerKittoFlora2009-11-16 01:40:15 +0100
commit873c9098d8627972e80a1688e85a4cda45e1e7fe (patch)
treea0edc24aef11d5ad6928493d8985386f48dd2607 /OpenSim/Region/Application/OpenSim.cs
parentMerge branch 'vehicles' into tests (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC_OLD-873c9098d8627972e80a1688e85a4cda45e1e7fe.zip
opensim-SC_OLD-873c9098d8627972e80a1688e85a4cda45e1e7fe.tar.gz
opensim-SC_OLD-873c9098d8627972e80a1688e85a4cda45e1e7fe.tar.bz2
opensim-SC_OLD-873c9098d8627972e80a1688e85a4cda45e1e7fe.tar.xz
Merge branch 'careminster' into tests
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs56
1 files changed, 56 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index b448182..60c34df 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -343,6 +343,10 @@ namespace OpenSim
343 "Add-InventoryHost <host>", 343 "Add-InventoryHost <host>",
344 String.Empty, RunCommand); 344 String.Empty, RunCommand);
345 345
346 m_console.Commands.AddCommand("region", false, "kill uuid",
347 "kill uuid <UUID>",
348 "Kill an object by UUID", KillUUID);
349
346 if (ConfigurationSettings.Standalone) 350 if (ConfigurationSettings.Standalone)
347 { 351 {
348 m_console.Commands.AddCommand("region", false, "create user", 352 m_console.Commands.AddCommand("region", false, "create user",
@@ -1332,6 +1336,58 @@ namespace OpenSim
1332 return result; 1336 return result;
1333 } 1337 }
1334 1338
1339 /// <summary>
1340 /// Kill an object given its UUID.
1341 /// </summary>
1342 /// <param name="cmdparams"></param>
1343 protected void KillUUID(string module, string[] cmdparams)
1344 {
1345 if (cmdparams.Length > 2)
1346 {
1347 UUID id = UUID.Zero;
1348 SceneObjectGroup grp = null;
1349 Scene sc = null;
1350
1351 if (!UUID.TryParse(cmdparams[2], out id))
1352 {
1353 MainConsole.Instance.Output("[KillUUID]: Error bad UUID format!");
1354 return;
1355 }
1356
1357 m_sceneManager.ForEachScene(
1358 delegate(Scene scene)
1359 {
1360 SceneObjectPart part = scene.GetSceneObjectPart(id);
1361 if (part == null)
1362 return;
1363
1364 grp = part.ParentGroup;
1365 sc = scene;
1366 });
1367
1368 if (grp == null)
1369 {
1370 MainConsole.Instance.Output(String.Format("[KillUUID]: Given UUID {0} not found!", id));
1371 }
1372 else
1373 {
1374 MainConsole.Instance.Output(String.Format("[KillUUID]: Found UUID {0} in scene {1}", id, sc.RegionInfo.RegionName));
1375 try
1376 {
1377 sc.DeleteSceneObject(grp, false);
1378 }
1379 catch (Exception e)
1380 {
1381 m_log.ErrorFormat("[KillUUID]: Error while removing objects from scene: " + e);
1382 }
1383 }
1384 }
1385 else
1386 {
1387 MainConsole.Instance.Output("[KillUUID]: Usage: kill uuid <UUID>");
1388 }
1389 }
1390
1335 #endregion 1391 #endregion
1336 } 1392 }
1337} 1393}