Fix non-working packet 93, allow tournament-only packets only from tourney clients
This commit is contained in:
parent
933c92e5f2
commit
ffc84448a2
|
@ -77,7 +77,7 @@ server_silenceEnd = 92
|
|||
server_userSilenced = 94
|
||||
server_userPresenceBundle = 96
|
||||
client_userPanelRequest = 97
|
||||
client_tournamentMatchInfoRequest = 937
|
||||
client_tournamentMatchInfoRequest = 93
|
||||
server_matchAbort = 106
|
||||
server_switchServer = 107
|
||||
client_tournamentJoinMatchChannel = 108
|
||||
|
|
|
@ -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:
|
||||
if matchID not in glob.matches.matches or not userToken.isTourney:
|
||||
return
|
||||
userToken.matchID = matchID
|
||||
chat.joinChannel(token=userToken, channel="#multi_{}".format(matchID))
|
|
@ -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:
|
||||
if matchID not in glob.matches.matches or not userToken.isTourney:
|
||||
return
|
||||
chat.partChannel(token=userToken, channel="#multi_{}".format(matchID))
|
||||
userToken.matchID = 0
|
|
@ -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:
|
||||
if matchID not in glob.matches.matches or not userToken.isTourney:
|
||||
return
|
||||
userToken.enqueue(glob.matches.matches[matchID].matchDataCache)
|
Loading…
Reference in New Issue
Block a user