From e5b91442822df211f9f8277aaf0c40e1339810f3 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 18 Mar 2008 15:30:38 +0000 Subject: Formatting cleanup. --- OpenSim/Region/Application/OpenSimMain.cs | 97 ++++++++++++++++--------------- 1 file changed, 51 insertions(+), 46 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e8490dc..e50187e 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -455,7 +455,7 @@ namespace OpenSim // set initial ServerURI regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName - + ":" + regionInfo.InternalEndPoint.Port.ToString(); + + ":" + regionInfo.InternalEndPoint.Port.ToString(); if ((proxyUrl.Length > 0) && (portadd_flag)) { @@ -616,7 +616,7 @@ namespace OpenSim public virtual void Shutdown() { ProxyCommand(proxyUrl, "Stop"); - + if (m_startupCommandsFile != String.Empty) { RunCommandScript(m_shutdownCommandsFile); @@ -632,7 +632,7 @@ namespace OpenSim m_console.Close(); Environment.Exit(0); - } + } private void RunAutoTimerScript(object sender, EventArgs e) { @@ -722,17 +722,23 @@ namespace OpenSim } break; - case "scene-debug": - if (cmdparams.Length == 3) { - if (m_sceneManager.CurrentScene == null) { - m_console.Error("CONSOLE", "Please use 'change-region ' first"); - } else { - m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); - } - } else { - m_console.Error("scene-debug (where inside <> is true/false)"); - } - break; + case "scene-debug": + if (cmdparams.Length == 3) + { + if (m_sceneManager.CurrentScene == null) + { + m_console.Error("CONSOLE", "Please use 'change-region ' first"); + } + else + { + m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2])); + } + } + else + { + m_console.Error("scene-debug (where inside <> is true/false)"); + } + break; case "help": m_console.Notice("alert - send alert to a designated user or all users."); @@ -772,15 +778,15 @@ namespace OpenSim break; case "threads": - //m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); - //int _tc = 0; +// m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); +// int _tc = 0; - //foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) - //{ - // _tc++; - // m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); - - //} +// foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) +// { +// _tc++; +// m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString()); +// } + List threads = OpenSim.Framework.ThreadTracker.GetThreads(); if (threads == null) { @@ -797,7 +803,6 @@ namespace OpenSim } } - break; case "save-xml": if (cmdparams.Length > 0) @@ -833,7 +838,7 @@ namespace OpenSim loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); } m_console.Error("loadOffsets = <" + loadOffset.X + "," + loadOffset.Y + "," + - loadOffset.Z + ">"); + loadOffset.Z + ">"); } } m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); @@ -1158,11 +1163,11 @@ namespace OpenSim case "regions": m_sceneManager.ForEachScene( delegate(Scene scene) - { - m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + - scene.RegionInfo.RegionLocX + " , Region YLoc: " + - scene.RegionInfo.RegionLocY); - }); + { + m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + + scene.RegionInfo.RegionLocX + " , Region YLoc: " + + scene.RegionInfo.RegionLocY); + }); break; case "stats": @@ -1191,7 +1196,8 @@ namespace OpenSim } #endregion - // TODO: remove me!! (almost same as XmlRpcCommand) + + // TODO: remove me!! (almost same as XmlRpcCommand) public object ProxyCommand(string url, string methodName, params object[] args) { if(proxyUrl.Length==0) return null; @@ -1230,34 +1236,33 @@ namespace OpenSim /// The first out parameter describing when the Region server started /// The second out parameter describing how long the Region server has run public void GetRunTime(out string starttime, out string uptime) - { - starttime = m_startuptime.ToString(); - uptime = (DateTime.Now - m_startuptime).ToString(); - } + { + starttime = m_startuptime.ToString(); + uptime = (DateTime.Now - m_startuptime).ToString(); + } /// /// Get the number of the avatars in the Region server /// /// The first out parameter describing the number of all the avatars in the Region server public void GetAvatarNumber(out int usernum) - { - usernum = m_sceneManager.GetCurrentSceneAvatars().Count; - } + { + usernum = m_sceneManager.GetCurrentSceneAvatars().Count; + } /// /// Get the number of the avatars in the Region server /// /// The first out parameter describing the number of all the avatars in the Region server public void GetRegionNumber(out int regionnum) - { - int accounter = 0; - //List regionNameList = new List(); - - m_sceneManager.ForEachScene(delegate(Scene scene) { - accounter++; - }); - regionnum = accounter; + { + int accounter = 0; + //List regionNameList = new List(); - } + m_sceneManager.ForEachScene(delegate(Scene scene) { + accounter++; + }); + regionnum = accounter; + } } } -- cgit v1.1