summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorTeddy <[email protected]>2013-08-30 23:16:23 +0800
committerTeddy <[email protected]>2013-08-30 23:16:23 +0800
commit944d5152cee8925f8da35f960063fc94b963e869 (patch)
tree861752be7d53c87378fea5d6bd93d08e25ce8481 /server
parent934a6b8ba8bc3fe84b0b9f384c5b925dca61ad4f (diff)
add level(perm) info_key in the response to login request
Diffstat (limited to 'server')
-rw-r--r--server/piztor/server.py6
1 files changed, 5 insertions, 1 deletions
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):