aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/OpenSimConsole.cs
diff options
context:
space:
mode:
authorgareth2007-03-13 11:28:04 +0000
committergareth2007-03-13 11:28:04 +0000
commit82e18112f2cee5ebb876d430ca8cb4a6c36c1cfd (patch)
tree785434fa2013b727b1dc3b9773944cf4b757ff91 /src/OpenSimConsole.cs
parentRolled back all but the VS solution (diff)
downloadopensim-SC_OLD-82e18112f2cee5ebb876d430ca8cb4a6c36c1cfd.zip
opensim-SC_OLD-82e18112f2cee5ebb876d430ca8cb4a6c36c1cfd.tar.gz
opensim-SC_OLD-82e18112f2cee5ebb876d430ca8cb4a6c36c1cfd.tar.bz2
opensim-SC_OLD-82e18112f2cee5ebb876d430ca8cb4a6c36c1cfd.tar.xz
added movement etc from r191
Diffstat (limited to 'src/OpenSimConsole.cs')
-rw-r--r--src/OpenSimConsole.cs43
1 files changed, 26 insertions, 17 deletions
diff --git a/src/OpenSimConsole.cs b/src/OpenSimConsole.cs
index 11bc648..00a4cee 100644
--- a/src/OpenSimConsole.cs
+++ b/src/OpenSimConsole.cs
@@ -61,6 +61,7 @@ namespace OpenSim
61 ConsType = constype; 61 ConsType = constype;
62 switch(constype) { 62 switch(constype) {
63 case ConsoleType.Local: 63 case ConsoleType.Local:
64
64 Console.WriteLine("ServerConsole.cs - creating new local console"); 65 Console.WriteLine("ServerConsole.cs - creating new local console");
65 Console.WriteLine("Logs will be saved to current directory in opensim-console.log"); 66 Console.WriteLine("Logs will be saved to current directory in opensim-console.log");
66 Log=File.AppendText("opensim-console.log"); 67 Log=File.AppendText("opensim-console.log");
@@ -75,22 +76,30 @@ namespace OpenSim
75 default: 76 default:
76 Console.WriteLine("ServerConsole.cs - what are you smoking? that isn't a valid console type!"); 77 Console.WriteLine("ServerConsole.cs - what are you smoking? that isn't a valid console type!");
77 break; 78 break;
78 } 79 }
79 } 80 }
80 81
81 public override void Close() { 82 public override void Close() {
82 Log.WriteLine("OpenSim shutdown at " + DateTime.Now.ToString()); 83 Log.WriteLine("OpenSim shutdown at " + DateTime.Now.ToString());
83 Log.Close(); 84 Log.Close();
84 } 85 }
85 86
86 // You know what ReadLine() and WriteLine() do, right? And Read() and Write()? Right, you do actually know C#, right? Are you actually a programmer? Do you know english? Do you find my sense of humour in comments irritating? Good, glad you're still here 87 public override void Write(string format, params object[] args)
87 public override void WriteLine(string Line) { 88 {
88 Log.WriteLine(Line); 89 Log.Write(format, args);
89 Console.WriteLine(Line); 90 Console.Write(format, args);
90 return; 91 return;
91 } 92 }
92 93
93 public override string ReadLine() { 94 public override void WriteLine(string format, params object[] args)
95 {
96 Log.WriteLine(format, args);
97 Console.WriteLine(format, args);
98 return;
99 }
100
101 public override string ReadLine()
102 {
94 string TempStr=Console.ReadLine(); 103 string TempStr=Console.ReadLine();
95 Log.WriteLine(TempStr); 104 Log.WriteLine(TempStr);
96 return TempStr; 105 return TempStr;
@@ -102,12 +111,6 @@ namespace OpenSim
102 return TempInt; 111 return TempInt;
103 } 112 }
104 113
105 public override void Write(string Line) {
106 Console.Write(Line);
107 Log.Write(Line);
108 return;
109 }
110
111 // Displays a command prompt and waits for the user to enter a string, then returns that string 114 // Displays a command prompt and waits for the user to enter a string, then returns that string
112 public override string CmdPrompt(string prompt) { 115 public override string CmdPrompt(string prompt) {
113 this.Write(prompt); 116 this.Write(prompt);
@@ -196,7 +199,13 @@ namespace OpenSim
196 string[] cmdparams=(string[])tempstrarray; 199 string[] cmdparams=(string[])tempstrarray;
197 RunCmd(cmd,cmdparams); 200 RunCmd(cmd,cmdparams);
198 } 201 }
199 } 202
203
204 public override void SetStatus(string status)
205 {
206 Console.Write( status + "\r" );
207 }
208 }
200} 209}
201 210
202 211