diff --git a/constants/serverPackets.py b/constants/serverPackets.py index 5cacefd..bfd47d0 100644 --- a/constants/serverPackets.py +++ b/constants/serverPackets.py @@ -47,12 +47,13 @@ def protocolVersion(version = 19): def mainMenuIcon(icon): return packetHelper.buildPacket(packetIDs.server_mainMenuIcon, [[icon, dataTypes.STRING]]) -def userSupporterGMT(supporter, GMT): +def userSupporterGMT(supporter, GMT, tournamentStaff): result = 1 if supporter: result |= userRanks.SUPPORTER if GMT: result |= userRanks.BAT + if tournamentStaff: result |= userRanks.TOURNAMENT_STAFF return packetHelper.buildPacket(packetIDs.server_supporterGMT, [[result, dataTypes.UINT32]]) diff --git a/events/loginEvent.py b/events/loginEvent.py index a6ca237..730bd41 100644 --- a/events/loginEvent.py +++ b/events/loginEvent.py @@ -131,8 +131,11 @@ def handle(tornadoRequest): # Get supporter/GMT userGMT = False userSupporter = True + userTournament = False if responseToken.admin: userGMT = True + if responseToken.privileges & privileges.USER_TOURNAMENT_STAFF > 0: + userTournament = True # Server restarting check if glob.restarting: @@ -156,7 +159,7 @@ def handle(tornadoRequest): responseToken.enqueue(serverPackets.silenceEndTime(silenceSeconds)) responseToken.enqueue(serverPackets.userID(userID)) responseToken.enqueue(serverPackets.protocolVersion()) - responseToken.enqueue(serverPackets.userSupporterGMT(userSupporter, userGMT)) + responseToken.enqueue(serverPackets.userSupporterGMT(userSupporter, userGMT, userTournament)) responseToken.enqueue(serverPackets.userPanel(userID, True)) responseToken.enqueue(serverPackets.userStats(userID, True))