Skip to content

Commit

Permalink
fixed if else expr
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Dec 24, 2022
1 parent 4a802fe commit 1dda034
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions loginproxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ def new_connection(self, login_data: dict):
if protocol >= PROTOCOL_1_19:
send_package(sokt, 0x00,
encode_string(login_data['name']) +
(
((
encode_bool(login_data['has_sig']) +
((encode_long(login_data['timestamp']) +
encode_varint(len(login_data['pubkey'])) +
login_data['pubkey'] +
encode_varint(len(login_data['sign'])) +
login_data['sign']
) if login_data['has_sig'] else b'')
) if protocol < PROTOCOL_1_19_2 else b'' +
) if protocol < PROTOCOL_1_19_2 else b'') +
encode_bool(login_data['has_uuid']) +
(login_data['uuid'].bytes if login_data['has_uuid'] else b'')
)
Expand Down

0 comments on commit 1dda034

Please sign in to comment.