summaryrefslogtreecommitdiff
path: root/protocol.py
diff options
context:
space:
mode:
Diffstat (limited to 'protocol.py')
-rw-r--r--protocol.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/protocol.py b/protocol.py
index fe71290..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
@@ -72,7 +74,7 @@ def parse(packet, conn):
if not data[0].isalnum():
return [PACKET_NACK, "Invalid packet (TOKENF)"]
- # TODO: Now validate the token itself
+ # Now validate the token itself
if data[0] != conn.token:
return [PACKET_NACK, "Invalid packet (TOKENC)"]