* Refactor: Minor cleanup of Debug method in OpenSim.cs

0.6.0-stable
Justin Clarke Casey 2008-07-12 19:47:45 +00:00
parent 451c3d1dd7
commit 91a208b6a5
1 changed files with 13 additions and 5 deletions

View File

@ -241,10 +241,7 @@ namespace OpenSim
break; break;
case "debug": case "debug":
if (cmdparams.Length > 0) Debug(cmdparams);
{
Debug(cmdparams);
}
break; break;
case "scene-debug": case "scene-debug":
@ -434,6 +431,7 @@ namespace OpenSim
case "create-region": case "create-region":
CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1],false), true); CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1],false), true);
break; break;
case "remove-region": case "remove-region":
string regName = CombineParams(cmdparams, 0); string regName = CombineParams(cmdparams, 0);
@ -544,6 +542,7 @@ namespace OpenSim
} }
} }
break; break;
case "modules": case "modules":
if (cmdparams.Length > 0) if (cmdparams.Length > 0)
{ {
@ -590,6 +589,7 @@ namespace OpenSim
m_commsManager.AddInventoryService(cmdparams[0]); m_commsManager.AddInventoryService(cmdparams[0]);
} }
break; break;
default: default:
string[] tmpPluginArgs = new string[cmdparams.Length + 1]; string[] tmpPluginArgs = new string[cmdparams.Length + 1];
cmdparams.CopyTo(tmpPluginArgs, 1); cmdparams.CopyTo(tmpPluginArgs, 1);
@ -600,8 +600,15 @@ namespace OpenSim
} }
} }
public void Debug(string[] args) /// <summary>
/// Turn on some debugging values for OpenSim.
/// </summary>
/// <param name="args"></param>
protected void Debug(string[] args)
{ {
if (args.Length == 0)
return;
switch (args[0]) switch (args[0])
{ {
case "packet": case "packet":
@ -620,6 +627,7 @@ namespace OpenSim
} }
break; break;
default: default:
m_console.Error("Unknown debug"); m_console.Error("Unknown debug");
break; break;