aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/OpenSimConsole.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/OpenSimConsole.cs')
-rw-r--r--src/OpenSimConsole.cs43
1 files changed, 17 insertions, 26 deletions
diff --git a/src/OpenSimConsole.cs b/src/OpenSimConsole.cs
index 00a4cee..11bc648 100644
--- a/src/OpenSimConsole.cs
+++ b/src/OpenSimConsole.cs
@@ -61,7 +61,6 @@ namespace OpenSim
61 ConsType = constype; 61 ConsType = constype;
62 switch(constype) { 62 switch(constype) {
63 case ConsoleType.Local: 63 case ConsoleType.Local:
64
65 Console.WriteLine("ServerConsole.cs - creating new local console"); 64 Console.WriteLine("ServerConsole.cs - creating new local console");
66 Console.WriteLine("Logs will be saved to current directory in opensim-console.log"); 65 Console.WriteLine("Logs will be saved to current directory in opensim-console.log");
67 Log=File.AppendText("opensim-console.log"); 66 Log=File.AppendText("opensim-console.log");
@@ -76,30 +75,22 @@ namespace OpenSim
76 default: 75 default:
77 Console.WriteLine("ServerConsole.cs - what are you smoking? that isn't a valid console type!"); 76 Console.WriteLine("ServerConsole.cs - what are you smoking? that isn't a valid console type!");
78 break; 77 break;
79 } 78 }
80 } 79 }
81 80
82 public override void Close() { 81 public override void Close() {
83 Log.WriteLine("OpenSim shutdown at " + DateTime.Now.ToString()); 82 Log.WriteLine("OpenSim shutdown at " + DateTime.Now.ToString());
84 Log.Close(); 83 Log.Close();
85 } 84 }
86 85
87 public override void Write(string format, params object[] args) 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
88 { 87 public override void WriteLine(string Line) {
89 Log.Write(format, args); 88 Log.WriteLine(Line);
90 Console.Write(format, args); 89 Console.WriteLine(Line);
91 return; 90 return;
92 } 91 }
93 92
94 public override void WriteLine(string format, params object[] args) 93 public override string ReadLine() {
95 {
96 Log.WriteLine(format, args);
97 Console.WriteLine(format, args);
98 return;
99 }
100
101 public override string ReadLine()
102 {
103 string TempStr=Console.ReadLine(); 94 string TempStr=Console.ReadLine();
104 Log.WriteLine(TempStr); 95 Log.WriteLine(TempStr);
105 return TempStr; 96 return TempStr;
@@ -111,6 +102,12 @@ namespace OpenSim
111 return TempInt; 102 return TempInt;
112 } 103 }
113 104
105 public override void Write(string Line) {
106 Console.Write(Line);
107 Log.Write(Line);
108 return;
109 }
110
114 // Displays a command prompt and waits for the user to enter a string, then returns that string 111 // Displays a command prompt and waits for the user to enter a string, then returns that string
115 public override string CmdPrompt(string prompt) { 112 public override string CmdPrompt(string prompt) {
116 this.Write(prompt); 113 this.Write(prompt);
@@ -199,13 +196,7 @@ namespace OpenSim
199 string[] cmdparams=(string[])tempstrarray; 196 string[] cmdparams=(string[])tempstrarray;
200 RunCmd(cmd,cmdparams); 197 RunCmd(cmd,cmdparams);
201 } 198 }
202 199 }
203
204 public override void SetStatus(string status)
205 {
206 Console.Write( status + "\r" );
207 }
208 }
209} 200}
210 201
211 202