.BANCHO. .NEW. Add FokaBot message when opening osudirect for the first time
This commit is contained in:
parent
9d2fcf250f
commit
ec2bce8893
|
@ -3,6 +3,7 @@ from constants import clientPackets
|
||||||
from constants import serverPackets
|
from constants import serverPackets
|
||||||
from helpers import userHelper
|
from helpers import userHelper
|
||||||
from helpers import logHelper as log
|
from helpers import logHelper as log
|
||||||
|
from constants import actions
|
||||||
|
|
||||||
def handle(userToken, packetData):
|
def handle(userToken, packetData):
|
||||||
# Get usertoken data
|
# Get usertoken data
|
||||||
|
@ -24,6 +25,12 @@ def handle(userToken, packetData):
|
||||||
userToken.actionMods = packetData["actionMods"]
|
userToken.actionMods = packetData["actionMods"]
|
||||||
userToken.gameMode = packetData["gameMode"]
|
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
|
# Enqueue our new user panel and stats to everyone
|
||||||
glob.tokens.enqueueAll(serverPackets.userPanel(userID))
|
glob.tokens.enqueueAll(serverPackets.userPanel(userID))
|
||||||
glob.tokens.enqueueAll(serverPackets.userStats(userID))
|
glob.tokens.enqueueAll(serverPackets.userStats(userID))
|
||||||
|
|
|
@ -70,6 +70,7 @@ class token:
|
||||||
self.tillerino = [0,0,-1.0] # beatmap, mods, acc
|
self.tillerino = [0,0,-1.0] # beatmap, mods, acc
|
||||||
self.silenceEndTime = 0
|
self.silenceEndTime = 0
|
||||||
self.queue = bytes()
|
self.queue = bytes()
|
||||||
|
self.osuDirectAlert = False # NOTE: Remove this when osu!direct will be fixed
|
||||||
|
|
||||||
# Spam protection
|
# Spam protection
|
||||||
self.longMessageWarning = False
|
self.longMessageWarning = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user