.BANCHO. .NEW. Add FokaBot message when opening osudirect for the first time

This commit is contained in:
Nyo 2016-06-15 11:49:06 +02:00
parent 9d2fcf250f
commit ec2bce8893
2 changed files with 8 additions and 0 deletions

View File

@ -3,6 +3,7 @@ from constants import clientPackets
from constants import serverPackets
from helpers import userHelper
from helpers import logHelper as log
from constants import actions
def handle(userToken, packetData):
# Get usertoken data
@ -24,6 +25,12 @@ def handle(userToken, packetData):
userToken.actionMods = packetData["actionMods"]
userToken.gameMode = packetData["gameMode"]
# Send osu!direct alert if needed
# NOTE: Remove this when osu!direct will be fixed
if userToken.actionID == actions.osuDirect and userToken.osuDirectAlert == False:
userToken.osuDirectAlert = True
userToken.enqueue(serverPackets.sendMessage("FokaBot", userToken.username, "Sup! osu!direct works, kinda. To download a beatmap, you have to click the \"View listing\" button (the last one) instead of \"Download\". However, if you are on the stable (fallback) branch, it should work also with the \"Download\" button. We'll fix that bug as soon as possibleTM."))
# Enqueue our new user panel and stats to everyone
glob.tokens.enqueueAll(serverPackets.userPanel(userID))
glob.tokens.enqueueAll(serverPackets.userStats(userID))

View File

@ -70,6 +70,7 @@ class token:
self.tillerino = [0,0,-1.0] # beatmap, mods, acc
self.silenceEndTime = 0
self.queue = bytes()
self.osuDirectAlert = False # NOTE: Remove this when osu!direct will be fixed
# Spam protection
self.longMessageWarning = False