pep.py/events/tournamentMatchInfoRequestE...

10 lines
354 B
Python

from constants import clientPackets
from objects import glob
def handle(userToken, packetData):
packetData = clientPackets.tournamentMatchInfoRequest(packetData)
matchID = packetData["matchID"]
if matchID not in glob.matches.matches or not userToken.tournament:
return
with glob.matches.matches[matchID] as m:
userToken.enqueue(m.matchDataCache)