aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs58
1 files changed, 58 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 9ac5117..8327e26 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -380,11 +380,20 @@ namespace OpenSim
380 { 380 {
381 switch (command) 381 switch (command)
382 { 382 {
383 case "debug":
384 if (cmdparams.Length > 0)
385 {
386 Debug(cmdparams);
387 }
388 break;
389
383 case "help": 390 case "help":
384 m_log.Error("alert - send alert to a designated user or all users."); 391 m_log.Error("alert - send alert to a designated user or all users.");
385 m_log.Error(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); 392 m_log.Error(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive.");
386 m_log.Error(" alert general [Message] - send an alert to all users."); 393 m_log.Error(" alert general [Message] - send an alert to all users.");
387 m_log.Error("backup - trigger a simulator backup"); 394 m_log.Error("backup - trigger a simulator backup");
395 m_log.Error("debug - debugging commands");
396 m_log.Error(" packet 0..255 - print incoming/outgoing packets (0=off)");
388 m_log.Error("load-xml [filename] - load prims from XML"); 397 m_log.Error("load-xml [filename] - load prims from XML");
389 m_log.Error("save-xml [filename] - save prims to XML"); 398 m_log.Error("save-xml [filename] - save prims to XML");
390 m_log.Error("script - manually trigger scripts? or script commands?"); 399 m_log.Error("script - manually trigger scripts? or script commands?");
@@ -555,6 +564,55 @@ namespace OpenSim
555 } 564 }
556 } 565 }
557 566
567 private void DebugPacket(int newDebug)
568 {
569 for (int i = 0; i < m_localScenes.Count; i++)
570 {
571 Scene scene = m_localScenes[i];
572 foreach (EntityBase entity in scene.Entities.Values)
573 {
574 if (entity is ScenePresence)
575 {
576 ScenePresence scenePrescence = entity as ScenePresence;
577 if (!scenePrescence.childAgent)
578 {
579 m_log.Error(String.Format("Packet debug for {0} {1} set to {2}",
580 scenePrescence.Firstname, scenePrescence.Lastname,
581 newDebug));
582 scenePrescence.ControllingClient.SetDebug(newDebug);
583 }
584 }
585 }
586 }
587 }
588 public void Debug(string[] args)
589 {
590 switch(args[0])
591 {
592 case "packet":
593 if (args.Length > 1)
594 {
595 int newDebug;
596 if (int.TryParse(args[1], out newDebug))
597 {
598 DebugPacket(newDebug);
599 }
600 else
601 {
602 m_log.Error("packet debug should be 0..2");
603 }
604 System.Console.WriteLine("New packet debug: " + newDebug.ToString());
605
606 }
607
608 break;
609 default:
610 m_log.Error("Unknown debug");
611 break;
612 }
613
614 }
615
558 /// <summary> 616 /// <summary>
559 /// Outputs to the console information about the region 617 /// Outputs to the console information about the region
560 /// </summary> 618 /// </summary>