diff --git a/constants/packetIDs.py b/constants/packetIDs.py index 06c62ca..30666b6 100644 --- a/constants/packetIDs.py +++ b/constants/packetIDs.py @@ -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 diff --git a/events/tournamentJoinMatchChannelEvent.py b/events/tournamentJoinMatchChannelEvent.py index 57ddc4e..74b7296 100644 --- a/events/tournamentJoinMatchChannelEvent.py +++ b/events/tournamentJoinMatchChannelEvent.py @@ -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)) \ No newline at end of file diff --git a/events/tournamentLeaveMatchChannelEvent.py b/events/tournamentLeaveMatchChannelEvent.py index fd551fc..4cd80f8 100644 --- a/events/tournamentLeaveMatchChannelEvent.py +++ b/events/tournamentLeaveMatchChannelEvent.py @@ -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 \ No newline at end of file diff --git a/events/tournamentMatchInfoRequestEvent.py b/events/tournamentMatchInfoRequestEvent.py index 6646949..fe09188 100644 --- a/events/tournamentMatchInfoRequestEvent.py +++ b/events/tournamentMatchInfoRequestEvent.py @@ -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) \ No newline at end of file