.BANCHO. Some code refactoring

This commit is contained in:
Nyo
2016-09-02 17:16:22 +02:00
parent 653303831b
commit 3703618112
11 changed files with 191 additions and 182 deletions

View File

@@ -32,7 +32,7 @@ def handle(userToken, packetData):
# userToken.partMatch()
# Update cached stats if our pp changedm if we've just submitted a score or we've changed gameMode
if (userToken.actionID == actions.playing or userToken.actionID == actions.multiplaying) or (userToken.pp != userHelper.getPP(userID, userToken.gameMode)) or (userToken.gameMode != packetData["gameMode"]):
if (userToken.actionID == actions.PLAYING or userToken.actionID == actions.MULTIPLAYING) or (userToken.pp != userHelper.getPP(userID, userToken.gameMode)) or (userToken.gameMode != packetData["gameMode"]):
# Always update game mode, or we'll cache stats from the wrong game mode if we've changed it
userToken.gameMode = packetData["gameMode"]
userToken.updateCachedStats()