diff --git a/events/changeActionEvent.py b/events/changeActionEvent.py index 6019ae8..32a17b4 100644 --- a/events/changeActionEvent.py +++ b/events/changeActionEvent.py @@ -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)) diff --git a/objects/osuToken.py b/objects/osuToken.py index 2d9090e..29b06f2 100644 --- a/objects/osuToken.py +++ b/objects/osuToken.py @@ -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