Fix wrong variable names

This commit is contained in:
Giuseppe Guerra 2017-08-07 23:53:09 +02:00
parent ffc84448a2
commit e2149d7d61
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ from helpers import chatHelper as chat
def handle(userToken, packetData):
packetData = clientPackets.tournamentJoinMatchChannel(packetData)
matchID = packetData["matchID"]
if matchID not in glob.matches.matches or not userToken.isTourney:
if matchID not in glob.matches.matches or not userToken.tournament:
return
userToken.matchID = matchID
chat.joinChannel(token=userToken, channel="#multi_{}".format(matchID))

View File

@ -5,7 +5,7 @@ from helpers import chatHelper as chat
def handle(userToken, packetData):
packetData = clientPackets.tournamentLeaveMatchChannel(packetData)
matchID = packetData["matchID"]
if matchID not in glob.matches.matches or not userToken.isTourney:
if matchID not in glob.matches.matches or not userToken.tournament:
return
chat.partChannel(token=userToken, channel="#multi_{}".format(matchID))
userToken.matchID = 0

View File

@ -4,6 +4,6 @@ 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.isTourney:
if matchID not in glob.matches.matches or not userToken.tournament:
return
userToken.enqueue(glob.matches.matches[matchID].matchDataCache)