The ascension of the Madonna (the 15th of August is approaching)
This commit is contained in:
@@ -17,7 +17,7 @@ class handler(requestsManager.asyncRequestHandler):
|
||||
data = {"message": "unknown error"}
|
||||
try:
|
||||
# Get online users count
|
||||
data["result"] = -1 if glob.restarting == True else 1
|
||||
data["result"] = -1 if glob.restarting else 1
|
||||
|
||||
# Status code and message
|
||||
statusCode = 200
|
||||
|
@@ -106,7 +106,7 @@ class handler(requestsManager.asyncRequestHandler):
|
||||
packetData = requestData[pos:(pos+dataLength+7)]
|
||||
|
||||
# Console output if needed
|
||||
if glob.outputPackets == True and packetID != 4:
|
||||
if glob.outputPackets and packetID != 4:
|
||||
log.debug("Incoming packet ({})({}):\n\nPacket code: {}\nPacket length: {}\nSingle packet data: {}\n".format(requestTokenString, userToken.username, str(packetID), str(dataLength), str(packetData)))
|
||||
|
||||
# Event handler
|
||||
@@ -179,7 +179,7 @@ class handler(requestsManager.asyncRequestHandler):
|
||||
# Process/ignore packet
|
||||
if packetID != 4:
|
||||
if packetID in eventHandler:
|
||||
if userToken.restricted == False or (userToken.restricted == True and packetID in packetsRestricted):
|
||||
if userToken.restricted == False or (userToken.restricted and packetID in packetsRestricted):
|
||||
eventHandler[packetID]()
|
||||
else:
|
||||
log.warning("Ignored packet id from {} ({}) (user is restricted)".format(requestTokenString, packetID))
|
||||
|
Reference in New Issue
Block a user