Cleanup
This commit is contained in:
parent
bd41858a17
commit
c418bb0460
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user