Add !mp abort, fix match not being set as in progress when starting it
This commit is contained in:
@@ -936,6 +936,11 @@ def multiplayer(fro, chan, message):
|
||||
_match.sendUpdates()
|
||||
return "Match settings have been updated!"
|
||||
|
||||
def mpAbort():
|
||||
_match = glob.matches.matches[getMatchIDFromChannel(chan)]
|
||||
_match.abort()
|
||||
return "Match aborted!"
|
||||
|
||||
try:
|
||||
subcommands = {
|
||||
"make": mpMake,
|
||||
@@ -951,6 +956,7 @@ def multiplayer(fro, chan, message):
|
||||
"invite": mpInvite,
|
||||
"map": mpMap,
|
||||
"set": mpSet,
|
||||
"abort": mpAbort,
|
||||
}
|
||||
requestedSubcommand = message[0].lower().strip()
|
||||
if requestedSubcommand not in subcommands:
|
||||
|
@@ -77,7 +77,8 @@ server_silenceEnd = 92
|
||||
server_userSilenced = 94
|
||||
server_userPresenceBundle = 96
|
||||
client_userPanelRequest = 97
|
||||
client_tournamentMatchInfoRequest = 93
|
||||
client_tournamentMatchInfoRequest = 937
|
||||
server_matchAbort = 106
|
||||
server_switchServer = 107
|
||||
client_tournamentJoinMatchChannel = 108
|
||||
client_tournamentLeaveMatchChannel = 109
|
@@ -264,6 +264,9 @@ def playerFailed(slotID):
|
||||
def matchTransferHost():
|
||||
return packetHelper.buildPacket(packetIDs.server_matchTransferHost)
|
||||
|
||||
def matchAbort():
|
||||
return packetHelper.buildPacket(packetIDs.server_matchAbort)
|
||||
|
||||
def switchServer(address):
|
||||
return packetHelper.buildPacket(packetIDs.server_switchServer, [[address, dataTypes.STRING]])
|
||||
|
||||
|
Reference in New Issue
Block a user