From 944d5152cee8925f8da35f960063fc94b963e869 Mon Sep 17 00:00:00 2001 From: Teddy Date: Fri, 30 Aug 2013 23:16:23 +0800 Subject: add level(perm) info_key in the response to login request --- server/piztor/server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/piztor/server.py b/server/piztor/server.py index 86ec383..bc342be 100644 --- a/server/piztor/server.py +++ b/server/piztor/server.py @@ -170,6 +170,9 @@ def pack_lat(user): def pack_lng(user): return struct.pack("!d", user.location.lng) +def pack_perm(user): + return struct.pack("!B", user.perm) + class RequestHandler(object): push_tunnels = dict() def __init__(self): @@ -228,7 +231,8 @@ class RequestHandler(object): 0x04 : pack_sex, 0x05 : pack_gid, 0x06 : pack_lat, - 0x07 : pack_lng } + 0x07 : pack_lng, + 0x08 : pack_perm} @classmethod def pack_info_entry(cls, user, entry_code): -- cgit v1.2.3-70-g09d2