Don't start spectating unexisting users if user id is negative

This commit is contained in:
Giuseppe Guerra at an airport 2017-08-12 08:56:39 +02:00
parent b24b4ee88d
commit 0329847477

View File

@ -11,6 +11,7 @@ def handle(userToken, packetData):
# If the user id is less than 0, treat this as a stop spectating packet
if packetData["userID"] < 0:
userToken.stopSpectating()
return
# Get host token
targetToken = glob.tokens.getTokenFromUserID(packetData["userID"])