aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs56
1 files changed, 0 insertions, 56 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 04ff4e6..56ad5c9 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -409,10 +409,6 @@ namespace OpenSim
409 m_console.Commands.AddCommand("General", false, "modules unload", 409 m_console.Commands.AddCommand("General", false, "modules unload",
410 "modules unload <name>", 410 "modules unload <name>",
411 "Unload a module", HandleModules); 411 "Unload a module", HandleModules);
412
413 m_console.Commands.AddCommand("Objects", false, "kill uuid",
414 "kill uuid <UUID>",
415 "Kill an object by UUID", KillUUID);
416 } 412 }
417 413
418 public override void ShutdownSpecific() 414 public override void ShutdownSpecific()
@@ -1309,58 +1305,6 @@ namespace OpenSim
1309 return result; 1305 return result;
1310 } 1306 }
1311 1307
1312 /// <summary>
1313 /// Kill an object given its UUID.
1314 /// </summary>
1315 /// <param name="cmdparams"></param>
1316 protected void KillUUID(string module, string[] cmdparams)
1317 {
1318 if (cmdparams.Length > 2)
1319 {
1320 UUID id = UUID.Zero;
1321 SceneObjectGroup grp = null;
1322 Scene sc = null;
1323
1324 if (!UUID.TryParse(cmdparams[2], out id))
1325 {
1326 MainConsole.Instance.Output("[KillUUID]: Error bad UUID format!");
1327 return;
1328 }
1329
1330 m_sceneManager.ForEachScene(
1331 delegate(Scene scene)
1332 {
1333 SceneObjectPart part = scene.GetSceneObjectPart(id);
1334 if (part == null)
1335 return;
1336
1337 grp = part.ParentGroup;
1338 sc = scene;
1339 });
1340
1341 if (grp == null)
1342 {
1343 MainConsole.Instance.Output(String.Format("[KillUUID]: Given UUID {0} not found!", id));
1344 }
1345 else
1346 {
1347 MainConsole.Instance.Output(String.Format("[KillUUID]: Found UUID {0} in scene {1}", id, sc.RegionInfo.RegionName));
1348 try
1349 {
1350 sc.DeleteSceneObject(grp, false);
1351 }
1352 catch (Exception e)
1353 {
1354 m_log.ErrorFormat("[KillUUID]: Error while removing objects from scene: " + e);
1355 }
1356 }
1357 }
1358 else
1359 {
1360 MainConsole.Instance.Output("[KillUUID]: Usage: kill uuid <UUID>");
1361 }
1362 }
1363
1364 #endregion 1308 #endregion
1365 } 1309 }
1366} 1310}