aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-11-22 04:05:09 +0000
committerJustin Clark-Casey (justincc)2012-11-22 04:05:09 +0000
commit5c48d7a378ff066f59b9cee02f2803ebe1616481 (patch)
tree82af06819d5bb9d184890b5395e831b4e47c91d7 /OpenSim/Framework/Console
parentrefactor: Factor out copy/pasted server uptime report code (diff)
downloadopensim-SC-5c48d7a378ff066f59b9cee02f2803ebe1616481.zip
opensim-SC-5c48d7a378ff066f59b9cee02f2803ebe1616481.tar.gz
opensim-SC-5c48d7a378ff066f59b9cee02f2803ebe1616481.tar.bz2
opensim-SC-5c48d7a378ff066f59b9cee02f2803ebe1616481.tar.xz
factor out common HandleShow code for "show uptime"
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs2
-rwxr-xr-xOpenSim/Framework/Console/ConsoleBase.cs10
-rw-r--r--OpenSim/Framework/Console/MockConsole.cs7
3 files changed, 8 insertions, 11 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index bd23d1c..d1e29b4 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -711,7 +711,7 @@ namespace OpenSim.Framework.Console
711 /// </summary> 711 /// </summary>
712 public void Prompt() 712 public void Prompt()
713 { 713 {
714 string line = ReadLine(m_defaultPrompt + "# ", true, true); 714 string line = ReadLine(DefaultPrompt + "# ", true, true);
715 715
716 if (line != String.Empty) 716 if (line != String.Empty)
717 Output("Invalid command"); 717 Output("Invalid command");
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 4b375d9..2d8e723 100755
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -43,15 +43,7 @@ namespace OpenSim.Framework.Console
43 43
44 public object ConsoleScene { get; set; } 44 public object ConsoleScene { get; set; }
45 45
46 /// <summary> 46 public string DefaultPrompt { get; set; }
47 /// The default prompt text.
48 /// </summary>
49 public string DefaultPrompt
50 {
51 set { m_defaultPrompt = value; }
52 get { return m_defaultPrompt; }
53 }
54 protected string m_defaultPrompt;
55 47
56 public ConsoleBase(string defaultPrompt) 48 public ConsoleBase(string defaultPrompt)
57 { 49 {
diff --git a/OpenSim/Framework/Console/MockConsole.cs b/OpenSim/Framework/Console/MockConsole.cs
index b489f93..8ba58e4 100644
--- a/OpenSim/Framework/Console/MockConsole.cs
+++ b/OpenSim/Framework/Console/MockConsole.cs
@@ -46,13 +46,18 @@ namespace OpenSim.Framework.Console
46 46
47 public ICommands Commands { get { return m_commands; } } 47 public ICommands Commands { get { return m_commands; } }
48 48
49 public string DefaultPrompt { get; set; }
50
49 public void Prompt() {} 51 public void Prompt() {}
50 52
51 public void RunCommand(string cmd) {} 53 public void RunCommand(string cmd) {}
52 54
53 public string ReadLine(string p, bool isCommand, bool e) { return ""; } 55 public string ReadLine(string p, bool isCommand, bool e) { return ""; }
54 56
55 public object ConsoleScene { get { return null; } } 57 public object ConsoleScene {
58 get { return null; }
59 set {}
60 }
56 61
57 public void Output(string text, string level) {} 62 public void Output(string text, string level) {}
58 public void Output(string text) {} 63 public void Output(string text) {}