This commit is contained in:
fabjuuuh
2020-09-25 13:01:04 +02:00
parent 5a425bf19b
commit 7b9ad2540c
3 changed files with 6 additions and 3 deletions

View File

@@ -129,7 +129,8 @@ namespace Server
{
Console.WriteLine("Data " + packet);
dynamic json = JsonConvert.DeserializeObject(packet);
if (json.data.name == json.data.password)
Console.WriteLine("Name: "+json.data.username + "Password: "+json.data.password);
if (json.data.username == json.data.password)
{
dynamic payload = new
{
@@ -145,9 +146,10 @@ namespace Server
private void Write(string data)
{
byte[] bytes = DataParser.getMessage(Encoding.ASCII.GetBytes(data), 0x01);
byte[] bytes = DataParser.getMessage(Encoding.ASCII.GetBytes(data), 0x01, 0x01);
stream.Write(bytes, 0, bytes.Length);
stream.Flush();
Console.WriteLine("Wrote message");
}
}
}