diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-18 14:53:59 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-18 14:53:59 -0300 |
commit | 66f25ff0be2eff4aa77e7bdaf14df99c1125b2ec (patch) | |
tree | f6654285bc3af71869cf76e355972d405a951b7e /protocol.py | |
parent | c8dda24a93664933d476aa4724a73cbfcf240db8 (diff) | |
download | server-66f25ff0be2eff4aa77e7bdaf14df99c1125b2ec.tar.gz server-66f25ff0be2eff4aa77e7bdaf14df99c1125b2ec.tar.bz2 server-66f25ff0be2eff4aa77e7bdaf14df99c1125b2ec.tar.xz server-66f25ff0be2eff4aa77e7bdaf14df99c1125b2ec.zip |
Create tokens (unfinished, needs IP checking). Document max length experiments.
Login still not enabled.
Diffstat (limited to 'protocol.py')
-rw-r--r-- | protocol.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocol.py b/protocol.py index 8814d1b..8b3ce33 100644 --- a/protocol.py +++ b/protocol.py @@ -18,7 +18,7 @@ ######################################################################################## # Protocol Module # Parses packets -#import utils +import utils import player from consts import ERR_BAD @@ -40,6 +40,8 @@ def parse(packet): # Maybe it is an honest login attempt, or a registration attempt if data[1] == "login": # TODO: Create a token + if t == "0": + t=utils.create_token() r=player.get_data(data[2], t) if r is ERR_BAD: return [False, "Login error"] |