From 42cdb3725de0595306f8070487fd63dbfcc4d1f1 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 29 May 2017 14:32:27 +1000 Subject: [PATCH] Strip colour codes from server logs --- MCGalaxy/Server/Logger.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MCGalaxy/Server/Logger.cs b/MCGalaxy/Server/Logger.cs index cfc0fefbf..024148c6a 100644 --- a/MCGalaxy/Server/Logger.cs +++ b/MCGalaxy/Server/Logger.cs @@ -105,8 +105,11 @@ namespace MCGalaxy { static void FlushCache(string path, Queue cache) { //TODO: not happy about constantly opening and closing a stream like this but I suppose its ok (Pidgeon) using (StreamWriter w = new StreamWriter(path, true)) { - while (cache.Count > 0) - w.Write(cache.Dequeue()); + while (cache.Count > 0) { + string item = cache.Dequeue(); + item = Colors.StripColors(item); + w.Write(item); + } } }