From 91a208b6a58c9c1c9754794fa7efb9b6e6ef1a90 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sat, 12 Jul 2008 19:47:45 +0000
Subject: * Refactor: Minor cleanup of Debug method in OpenSim.cs

---
 OpenSim/Region/Application/OpenSim.cs | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index d4c7e70..5745048 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -241,10 +241,7 @@ namespace OpenSim
                     break;
 
                 case "debug":
-                    if (cmdparams.Length > 0)
-                    {
-                        Debug(cmdparams);
-                    }
+                    Debug(cmdparams);
                     break;
 
                 case "scene-debug":
@@ -434,6 +431,7 @@ namespace OpenSim
                 case "create-region":
                     CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1],false), true);
                     break;
+                
                 case "remove-region":
                     string regName = CombineParams(cmdparams, 0);
 
@@ -544,6 +542,7 @@ namespace OpenSim
                         }
                     }
                     break;
+                
                 case "modules":
                     if (cmdparams.Length > 0)
                     {
@@ -590,6 +589,7 @@ namespace OpenSim
                         m_commsManager.AddInventoryService(cmdparams[0]);
                     }
                     break;
+                
                 default:
                     string[] tmpPluginArgs = new string[cmdparams.Length + 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])
             {
                 case "packet":
@@ -620,6 +627,7 @@ namespace OpenSim
                     }
 
                     break;
+                
                 default:
                     m_console.Error("Unknown debug");
                     break;
-- 
cgit v1.1