Allow tourney clients to send messages in chat, send match info to lobby after creating it with !mp make
This commit is contained in:
parent
3bb1029832
commit
933c92e5f2
|
@ -774,6 +774,7 @@ def multiplayer(fro, chan, message):
|
||||||
if len(message) < 2:
|
if len(message) < 2:
|
||||||
raise exceptions.invalidArgumentsException("Wrong syntax: !mp make <name>")
|
raise exceptions.invalidArgumentsException("Wrong syntax: !mp make <name>")
|
||||||
matchID = glob.matches.createMatch(" ".join(message[1:]), generalUtils.stringMd5(generalUtils.randomString(32)), 0, "Tournament", "", 0, -1, isTourney=True)
|
matchID = glob.matches.createMatch(" ".join(message[1:]), generalUtils.stringMd5(generalUtils.randomString(32)), 0, "Tournament", "", 0, -1, isTourney=True)
|
||||||
|
glob.matches.matches[matchID].sendUpdates()
|
||||||
return "Tourney match #{} created!".format(matchID)
|
return "Tourney match #{} created!".format(matchID)
|
||||||
|
|
||||||
def mpJoin():
|
def mpJoin():
|
||||||
|
|
|
@ -18,7 +18,7 @@ def handle(userToken, packetData):
|
||||||
|
|
||||||
# Make sure the match has been created
|
# Make sure the match has been created
|
||||||
if matchID not in glob.matches.matches:
|
if matchID not in glob.matches.matches:
|
||||||
raise exceptions.matchCreateError
|
raise exceptions.matchCreateError()
|
||||||
|
|
||||||
# Get match object
|
# Get match object
|
||||||
match = glob.matches.matches[matchID]
|
match = glob.matches.matches[matchID]
|
||||||
|
|
|
@ -164,8 +164,8 @@ def sendMessage(fro = "", to = "", message = "", token = None, toIRC = True):
|
||||||
#tokenString = token.token
|
#tokenString = token.token
|
||||||
|
|
||||||
# Make sure this is not a tournament client
|
# Make sure this is not a tournament client
|
||||||
if token.tournament:
|
# if token.tournament:
|
||||||
raise exceptions.userTournamentException()
|
# raise exceptions.userTournamentException()
|
||||||
|
|
||||||
# Make sure the user is not in restricted mode
|
# Make sure the user is not in restricted mode
|
||||||
if token.restricted:
|
if token.restricted:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user