diff --git a/OpenCS2hock/GSIServer.cs b/OpenCS2hock/GSIServer.cs index 7b8fd56..c213ddb 100644 --- a/OpenCS2hock/GSIServer.cs +++ b/OpenCS2hock/GSIServer.cs @@ -33,12 +33,11 @@ public class GSIServer Console.WriteLine($"[{request.HttpMethod}] {request.Url} - {request.UserAgent}"); - HttpResponseMessage responseMessage = new HttpResponseMessage(HttpStatusCode.Accepted); + HttpResponseMessage responseMessage = new (HttpStatusCode.Accepted); context.Response.OutputStream.Write(Encoding.UTF8.GetBytes(responseMessage.ToString())); - StreamReader reader = new StreamReader(request.InputStream, request.ContentEncoding); + StreamReader reader = new (request.InputStream, request.ContentEncoding); string content = await reader.ReadToEndAsync(); - Console.WriteLine(content); OnMessage?.Invoke(content); } HttpListener.Close(); diff --git a/OpenCS2hock/OpenCS2hock.cs b/OpenCS2hock/OpenCS2hock.cs index 05a7972..4d6763a 100644 --- a/OpenCS2hock/OpenCS2hock.cs +++ b/OpenCS2hock/OpenCS2hock.cs @@ -61,7 +61,6 @@ public class OpenCS2hock { string fileName = Path.Combine(Environment.CurrentDirectory, "CS2Events" ,$"{DateTime.Now.ToLongTimeString().Replace(':','.')}.json"); File.WriteAllText(fileName, content); - Console.WriteLine(fileName); _cs2MessageHandler.HandleCS2Message(content); } } \ No newline at end of file