From f2c456c23df63e93d2ad7282203b94deac9f79f5 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 5 Aug 2008 17:28:23 +0000
Subject: * Make currently selected region appear in the region console prompt
* This region is used for single region commands (such as save-xml2)
---
OpenSim/Framework/Console/ConsoleBase.cs | 9 +++++++--
OpenSim/Region/Application/OpenSim.cs | 9 ++++++---
OpenSim/Region/Application/OpenSimBase.cs | 3 ---
3 files changed, 13 insertions(+), 8 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index f5c2bcf..f21127b 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -46,7 +46,12 @@ namespace OpenSim.Framework.Console
///
/// The default prompt text.
///
- public string m_defaultPrompt;
+ public string DefaultPrompt
+ {
+ set { m_defaultPrompt = value + "# "; }
+ get { return m_defaultPrompt; }
+ }
+ protected string m_defaultPrompt;
///
/// Constructor.
@@ -55,7 +60,7 @@ namespace OpenSim.Framework.Console
///
public ConsoleBase(string defaultPrompt, conscmd_callback cmdparser)
{
- m_defaultPrompt = defaultPrompt + "# ";
+ DefaultPrompt = defaultPrompt;
m_cmdParser = cmdparser;
}
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index e4f1ddc..0dc4560 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -92,6 +92,9 @@ namespace OpenSim
m_console = new ConsoleBase("Region", this);
MainConsole.Instance = m_console;
+ // For now, start at the 'root' level by default
+ ChangeSelectedRegion(new string[] {"root"});
+
base.Startup();
//Run Startup Commands
@@ -520,11 +523,11 @@ namespace OpenSim
if (!m_sceneManager.TrySetCurrentScene(regionName))
{
- m_console.Error("Couldn't set current region to: " + regionName);
+ m_console.Error("CONSOLE", "Couldn't set current region to: " + regionName);
}
}
-
- m_console.Notice("CONSOLE", "Selected region: " + GetSelectedRegionName());
+
+ m_console.DefaultPrompt = String.Format("Region ({0}) ", GetSelectedRegionName());
}
///
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index c718c53..ce5b335 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -138,9 +138,6 @@ namespace OpenSim
get { return m_httpServer; }
}
-// 6/28 Cfk: Commented out the new in this next line. It used to be
-// 6/28 cfk: public new uint HttpServerPort and it was causing a warning indicating there should not be a new
-// 6/28 cfk: There is still a new in the declaration above and it is unclear if it should be there or not.
public uint HttpServerPort
{
get { return m_httpServerPort; }
--
cgit v1.1