aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-08-05 17:28:23 +0000
committerJustin Clarke Casey2008-08-05 17:28:23 +0000
commitf2c456c23df63e93d2ad7282203b94deac9f79f5 (patch)
treed6fe25b85e813d75a9de52acba871fb0caf78c92 /OpenSim
parent* refactor: change console base 'component name' to 'default prompt' since th... (diff)
downloadopensim-SC-f2c456c23df63e93d2ad7282203b94deac9f79f5.zip
opensim-SC-f2c456c23df63e93d2ad7282203b94deac9f79f5.tar.gz
opensim-SC-f2c456c23df63e93d2ad7282203b94deac9f79f5.tar.bz2
opensim-SC-f2c456c23df63e93d2ad7282203b94deac9f79f5.tar.xz
* Make currently selected region appear in the region console prompt
* This region is used for single region commands (such as save-xml2)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs9
-rw-r--r--OpenSim/Region/Application/OpenSim.cs9
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs3
3 files changed, 13 insertions, 8 deletions
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
46 /// <summary> 46 /// <summary>
47 /// The default prompt text. 47 /// The default prompt text.
48 /// </summary> 48 /// </summary>
49 public string m_defaultPrompt; 49 public string DefaultPrompt
50 {
51 set { m_defaultPrompt = value + "# "; }
52 get { return m_defaultPrompt; }
53 }
54 protected string m_defaultPrompt;
50 55
51 /// <summary> 56 /// <summary>
52 /// Constructor. 57 /// Constructor.
@@ -55,7 +60,7 @@ namespace OpenSim.Framework.Console
55 /// <param name="cmdparser"></param> 60 /// <param name="cmdparser"></param>
56 public ConsoleBase(string defaultPrompt, conscmd_callback cmdparser) 61 public ConsoleBase(string defaultPrompt, conscmd_callback cmdparser)
57 { 62 {
58 m_defaultPrompt = defaultPrompt + "# "; 63 DefaultPrompt = defaultPrompt;
59 m_cmdParser = cmdparser; 64 m_cmdParser = cmdparser;
60 } 65 }
61 66
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
92 m_console = new ConsoleBase("Region", this); 92 m_console = new ConsoleBase("Region", this);
93 MainConsole.Instance = m_console; 93 MainConsole.Instance = m_console;
94 94
95 // For now, start at the 'root' level by default
96 ChangeSelectedRegion(new string[] {"root"});
97
95 base.Startup(); 98 base.Startup();
96 99
97 //Run Startup Commands 100 //Run Startup Commands
@@ -520,11 +523,11 @@ namespace OpenSim
520 523
521 if (!m_sceneManager.TrySetCurrentScene(regionName)) 524 if (!m_sceneManager.TrySetCurrentScene(regionName))
522 { 525 {
523 m_console.Error("Couldn't set current region to: " + regionName); 526 m_console.Error("CONSOLE", "Couldn't set current region to: " + regionName);
524 } 527 }
525 } 528 }
526 529
527 m_console.Notice("CONSOLE", "Selected region: " + GetSelectedRegionName()); 530 m_console.DefaultPrompt = String.Format("Region ({0}) ", GetSelectedRegionName());
528 } 531 }
529 532
530 /// <summary> 533 /// <summary>
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
138 get { return m_httpServer; } 138 get { return m_httpServer; }
139 } 139 }
140 140
141// 6/28 Cfk: Commented out the new in this next line. It used to be
142// 6/28 cfk: public new uint HttpServerPort and it was causing a warning indicating there should not be a new
143// 6/28 cfk: There is still a new in the declaration above and it is unclear if it should be there or not.
144 public uint HttpServerPort 141 public uint HttpServerPort
145 { 142 {
146 get { return m_httpServerPort; } 143 get { return m_httpServerPort; }