Alert users when entering tournament matches, make impossible to join tournament matches from ui
This commit is contained in:
parent
af554c94d5
commit
86995feb34
|
@ -25,9 +25,8 @@ def handle(userToken, packetData):
|
||||||
# password = generalUtils.stringMd5(password)
|
# password = generalUtils.stringMd5(password)
|
||||||
|
|
||||||
# Check password
|
# Check password
|
||||||
# TODO: Admins can enter every match
|
# Always send wrong password if this is a tourney match
|
||||||
if match.matchPassword != "":
|
if (match.matchPassword != "" and match.matchPassword != password) or match.isTourney:
|
||||||
if match.matchPassword != password:
|
|
||||||
raise exceptions.matchWrongPasswordException
|
raise exceptions.matchWrongPasswordException
|
||||||
|
|
||||||
# Password is correct, join match
|
# Password is correct, join match
|
||||||
|
|
|
@ -308,6 +308,10 @@ class token:
|
||||||
chat.joinChannel(token=self, channel="#multi_{}".format(self.matchID))
|
chat.joinChannel(token=self, channel="#multi_{}".format(self.matchID))
|
||||||
self.enqueue(serverPackets.matchJoinSuccess(matchID))
|
self.enqueue(serverPackets.matchJoinSuccess(matchID))
|
||||||
|
|
||||||
|
# Alert the user if we have just joined a tourney match
|
||||||
|
if match.isTourney:
|
||||||
|
self.enqueue(serverPackets.notification("You are now in a tournament match."))
|
||||||
|
|
||||||
def leaveMatch(self):
|
def leaveMatch(self):
|
||||||
"""
|
"""
|
||||||
Leave joined match, match stream and match channel
|
Leave joined match, match stream and match channel
|
||||||
|
|
Loading…
Reference in New Issue
Block a user