.BANCHO. Add UserTournamentStaff privilege
This commit is contained in:
parent
4babcd2643
commit
7347b1d455
|
@ -47,12 +47,13 @@ def protocolVersion(version = 19):
|
||||||
def mainMenuIcon(icon):
|
def mainMenuIcon(icon):
|
||||||
return packetHelper.buildPacket(packetIDs.server_mainMenuIcon, [[icon, dataTypes.STRING]])
|
return packetHelper.buildPacket(packetIDs.server_mainMenuIcon, [[icon, dataTypes.STRING]])
|
||||||
|
|
||||||
def userSupporterGMT(supporter, GMT):
|
def userSupporterGMT(supporter, GMT, tournamentStaff):
|
||||||
result = 1
|
result = 1
|
||||||
if supporter:
|
if supporter:
|
||||||
result |= userRanks.SUPPORTER
|
result |= userRanks.SUPPORTER
|
||||||
if GMT:
|
if GMT:
|
||||||
result |= userRanks.BAT
|
result |= userRanks.BAT
|
||||||
|
if tournamentStaff:
|
||||||
result |= userRanks.TOURNAMENT_STAFF
|
result |= userRanks.TOURNAMENT_STAFF
|
||||||
return packetHelper.buildPacket(packetIDs.server_supporterGMT, [[result, dataTypes.UINT32]])
|
return packetHelper.buildPacket(packetIDs.server_supporterGMT, [[result, dataTypes.UINT32]])
|
||||||
|
|
||||||
|
|
|
@ -131,8 +131,11 @@ def handle(tornadoRequest):
|
||||||
# Get supporter/GMT
|
# Get supporter/GMT
|
||||||
userGMT = False
|
userGMT = False
|
||||||
userSupporter = True
|
userSupporter = True
|
||||||
|
userTournament = False
|
||||||
if responseToken.admin:
|
if responseToken.admin:
|
||||||
userGMT = True
|
userGMT = True
|
||||||
|
if responseToken.privileges & privileges.USER_TOURNAMENT_STAFF > 0:
|
||||||
|
userTournament = True
|
||||||
|
|
||||||
# Server restarting check
|
# Server restarting check
|
||||||
if glob.restarting:
|
if glob.restarting:
|
||||||
|
@ -156,7 +159,7 @@ def handle(tornadoRequest):
|
||||||
responseToken.enqueue(serverPackets.silenceEndTime(silenceSeconds))
|
responseToken.enqueue(serverPackets.silenceEndTime(silenceSeconds))
|
||||||
responseToken.enqueue(serverPackets.userID(userID))
|
responseToken.enqueue(serverPackets.userID(userID))
|
||||||
responseToken.enqueue(serverPackets.protocolVersion())
|
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.userPanel(userID, True))
|
||||||
responseToken.enqueue(serverPackets.userStats(userID, True))
|
responseToken.enqueue(serverPackets.userStats(userID, True))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user