Minor fix

This commit is contained in:
Maxim Khomutov 2023-07-13 02:34:25 +03:00
parent 19c121f208
commit 22105b2030

View File

@ -25,10 +25,7 @@ class TCPServer:
self.log.info(f"Identifying new ClientConnection...") self.log.info(f"Identifying new ClientConnection...")
data = await client.recv() data = await client.recv()
self.log.debug(f"recv1 data: {data}") self.log.debug(f"recv1 data: {data}")
if len(data) > 50: if data.decode("utf-8") != f"VC{self.Core.client_major_version}":
await client.kick("Too long data")
return False, None
if "VC2.0" not in data.decode("utf-8"):
await client.kick("Outdated Version.") await client.kick("Outdated Version.")
return False, None return False, None
else: else: