Add various locks in osuToken object

This commit is contained in:
Giuseppe Guerra
2017-08-11 00:45:44 +02:00
parent aa1887e2c4
commit 466004f239
3 changed files with 228 additions and 159 deletions

View File

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