summaryrefslogtreecommitdiff
path: root/protocol.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-08-18 00:40:27 -0300
committerJesusaves <cpntb1@ymail.com>2021-08-18 00:40:27 -0300
commit745b5dc8a8e6323137ef549327ed051dc0ce56cb (patch)
tree2038ea4cb94a3c1231dce4e6908d80da6008fbdb /protocol.py
parent19de8477075b1fc95bf5aa9afd4d0fb29ab0d912 (diff)
downloadserver-745b5dc8a8e6323137ef549327ed051dc0ce56cb.tar.gz
server-745b5dc8a8e6323137ef549327ed051dc0ce56cb.tar.bz2
server-745b5dc8a8e6323137ef549327ed051dc0ce56cb.tar.xz
server-745b5dc8a8e6323137ef549327ed051dc0ce56cb.zip
Sanitize packet (so it can send numbers) and send special code for outdated clientsv2.1.8.18
Diffstat (limited to 'protocol.py')
-rw-r--r--protocol.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/protocol.py b/protocol.py
index fa9597a..98cebdb 100644
--- a/protocol.py
+++ b/protocol.py
@@ -54,6 +54,8 @@ def parse(packet, conn):
r=player.get_data(data[2], t)
if r is ERR_BAD:
return [PACKET_NACK, "Login error"]
+ elif type(r) is int:
+ return [PACKET_ACK, r] # FIXME: Lie?
else:
conn.userid=int(utils.Player[conn.token]["userid"])
conn.MS_auth=True