.BANCHO. .FIX. Return bytes rather than None in match packets if match doesn't exist
This commit is contained in:
parent
7c54df6586
commit
2d26d36fbf
|
@ -196,7 +196,7 @@ def fellowSpectatorLeft(userID):
|
||||||
def createMatch(matchID):
|
def createMatch(matchID):
|
||||||
# Make sure the match exists
|
# Make sure the match exists
|
||||||
if matchID not in glob.matches.matches:
|
if matchID not in glob.matches.matches:
|
||||||
return None
|
return bytes()
|
||||||
|
|
||||||
# Get match binary data and build packet
|
# Get match binary data and build packet
|
||||||
match = glob.matches.matches[matchID]
|
match = glob.matches.matches[matchID]
|
||||||
|
@ -206,7 +206,7 @@ def createMatch(matchID):
|
||||||
def updateMatch(matchID):
|
def updateMatch(matchID):
|
||||||
# Make sure the match exists
|
# Make sure the match exists
|
||||||
if matchID not in glob.matches.matches:
|
if matchID not in glob.matches.matches:
|
||||||
return None
|
return bytes()
|
||||||
|
|
||||||
# Get match binary data and build packet
|
# Get match binary data and build packet
|
||||||
match = glob.matches.matches[matchID]
|
match = glob.matches.matches[matchID]
|
||||||
|
@ -215,7 +215,7 @@ def updateMatch(matchID):
|
||||||
def matchStart(matchID):
|
def matchStart(matchID):
|
||||||
# Make sure the match exists
|
# Make sure the match exists
|
||||||
if matchID not in glob.matches.matches:
|
if matchID not in glob.matches.matches:
|
||||||
return None
|
return bytes()
|
||||||
|
|
||||||
# Get match binary data and build packet
|
# Get match binary data and build packet
|
||||||
match = glob.matches.matches[matchID]
|
match = glob.matches.matches[matchID]
|
||||||
|
@ -227,7 +227,7 @@ def disposeMatch(matchID):
|
||||||
def matchJoinSuccess(matchID):
|
def matchJoinSuccess(matchID):
|
||||||
# Make sure the match exists
|
# Make sure the match exists
|
||||||
if matchID not in glob.matches.matches:
|
if matchID not in glob.matches.matches:
|
||||||
return None
|
return bytes()
|
||||||
|
|
||||||
# Get match binary data and build packet
|
# Get match binary data and build packet
|
||||||
match = glob.matches.matches[matchID]
|
match = glob.matches.matches[matchID]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user