.BANCHO. Add UserTournamentStaff privilege
This commit is contained in:
parent
4babcd2643
commit
7347b1d455
|
@ -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]])
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user