Fix the multiplayer password bug while not breaking anything else, especially not multiplayer as a whole. (tested code)
This commit is contained in:
@@ -202,19 +202,18 @@ def createMatch(matchID):
|
||||
|
||||
# Get match binary data and build packet
|
||||
match = glob.matches.matches[matchID]
|
||||
matchData = match.getMatchData()
|
||||
matchData.matchPassword = ""
|
||||
matchData = match.getMatchData(censored=True)
|
||||
return packetHelper.buildPacket(packetIDs.server_newMatch, matchData)
|
||||
|
||||
# TODO: Add match object argument to save some CPU
|
||||
def updateMatch(matchID):
|
||||
def updateMatch(matchID, censored = False):
|
||||
# Make sure the match exists
|
||||
if matchID not in glob.matches.matches:
|
||||
return bytes()
|
||||
|
||||
# Get match binary data and build packet
|
||||
match = glob.matches.matches[matchID]
|
||||
return packetHelper.buildPacket(packetIDs.server_updateMatch, match.getMatchData())
|
||||
return packetHelper.buildPacket(packetIDs.server_updateMatch, match.getMatchData(censored=censored))
|
||||
|
||||
def matchStart(matchID):
|
||||
# Make sure the match exists
|
||||
@@ -271,4 +270,4 @@ def notification(message):
|
||||
return packetHelper.buildPacket(packetIDs.server_notification, [[message, dataTypes.STRING]])
|
||||
|
||||
def banchoRestart(msUntilReconnection):
|
||||
return packetHelper.buildPacket(packetIDs.server_restart, [[msUntilReconnection, dataTypes.UINT32]])
|
||||
return packetHelper.buildPacket(packetIDs.server_restart, [[msUntilReconnection, dataTypes.UINT32]])
|
||||
|
Reference in New Issue
Block a user