From d158b5168b8ebf01122db4febc8bd5fd6f6e084c Mon Sep 17 00:00:00 2001 From: spoogemonster Date: Wed, 24 Jul 2013 16:41:32 +0000 Subject: [PATCH] Further improvements on server console --- ServerServices/ServerConsole/ConsoleManager.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ServerServices/ServerConsole/ConsoleManager.cs b/ServerServices/ServerConsole/ConsoleManager.cs index 0159e098..6438f83b 100644 --- a/ServerServices/ServerConsole/ConsoleManager.cs +++ b/ServerServices/ServerConsole/ConsoleManager.cs @@ -37,6 +37,8 @@ public void Update() switch(key.Key) { case ConsoleKey.Enter: + if (currentBuffer.Length == 0) + break; Con.WriteLine("> " + currentBuffer); commandHistory.Add(commandHistory.Count, currentBuffer); historyIndex = commandHistory.Count; @@ -104,6 +106,8 @@ private void ExecuteCommand(string commandLine) var cmd = args[0].ToLower(); if (availableCommands.ContainsKey(cmd)) availableCommands[cmd].Execute(args); + else if (cmd.Length == 0) + return; else Con.WriteLine("Unknown command: " + cmd);