From 0587158f9208ecf9f39a6dd0ef7cb7c5663a39f8 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 13 Mar 2007 08:55:47 +0000 Subject: -- Trying to get trunk to run from first build * Collected required dll's into /bin * Moved timer start for great justice * Added some Writes to Console, and a Status field * Added dumb NullPhysicsScene and NullPhysicsActor that kicks in if Physics Plugin not specified * Svn-ignored a shitload --- src/OpenSimConsole.cs | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'src/OpenSimConsole.cs') 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 ConsType = constype; switch(constype) { case ConsoleType.Local: + Console.WriteLine("ServerConsole.cs - creating new local console"); Console.WriteLine("Logs will be saved to current directory in opensim-console.log"); Log=File.AppendText("opensim-console.log"); @@ -75,22 +76,30 @@ namespace OpenSim default: Console.WriteLine("ServerConsole.cs - what are you smoking? that isn't a valid console type!"); break; - } + } } public override void Close() { Log.WriteLine("OpenSim shutdown at " + DateTime.Now.ToString()); Log.Close(); } - - // 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 - public override void WriteLine(string Line) { - Log.WriteLine(Line); - Console.WriteLine(Line); - return; - } - - public override string ReadLine() { + + public override void Write(string format, params object[] args) + { + Log.Write(format, args); + Console.Write(format, args); + return; + } + + public override void WriteLine(string format, params object[] args) + { + Log.WriteLine(format, args); + Console.WriteLine(format, args); + return; + } + + public override string ReadLine() + { string TempStr=Console.ReadLine(); Log.WriteLine(TempStr); return TempStr; @@ -102,12 +111,6 @@ namespace OpenSim return TempInt; } - public override void Write(string Line) { - Console.Write(Line); - Log.Write(Line); - return; - } - // Displays a command prompt and waits for the user to enter a string, then returns that string public override string CmdPrompt(string prompt) { this.Write(prompt); @@ -196,7 +199,13 @@ namespace OpenSim string[] cmdparams=(string[])tempstrarray; RunCmd(cmd,cmdparams); } - } + + + public override void SetStatus(string status) + { + Console.Write( status + "\r" ); + } + } } -- cgit v1.1