2016-05-18 17:12:46 +00:00
|
|
|
from objects import glob
|
2016-04-19 17:40:59 +00:00
|
|
|
|
|
|
|
def handle(userToken, _):
|
|
|
|
# Get usertoken data
|
|
|
|
userID = userToken.userID
|
|
|
|
|
|
|
|
# Make sure the match exists
|
|
|
|
matchID = userToken.matchID
|
|
|
|
if matchID not in glob.matches.matches:
|
|
|
|
return
|
|
|
|
match = glob.matches.matches[matchID]
|
|
|
|
|
|
|
|
# Get our slotID and change ready status
|
|
|
|
slotID = match.getUserSlotID(userID)
|
2016-09-02 15:45:10 +00:00
|
|
|
if slotID is not None:
|
2016-04-19 17:40:59 +00:00
|
|
|
match.toggleSlotReady(slotID)
|