Tillerino / Tillerinobot

352 stars 112 forks source link

osu lazer support #228

Closed AuracleTech closed 10 months ago

AuracleTech commented 1 year ago

Tillerino doesn't read /np from lazer 😢

Tillerino commented 1 year ago

Oh is that a separate system or something? Does anybody know more?

AlexandraCat commented 11 months ago

Oh is that a separate system or something? Does anybody know more?

Yop! So basically I was wondering as well.. In osu!lazer you can't receive any info about "/np". From main menu it says: "listening to: .." and in game: "is playing ..." But neither of these works. Other commands do things as usual.

I can provide any info you needed.

Looking for your response, UwU.

Tillerino commented 11 months ago

Wait, so we do read messages from lazer somehow? So when a player goes !r in lazer, they get a response from the bot? Just the /np command doesn't work because that's not a thing in lazer anymore?

AuracleTech commented 11 months ago

Yeah from what I recall that's it

AlexandraCat commented 11 months ago

Wait, so we do read messages from lazer somehow? So when a player goes !r in lazer, they get a response from the bot? Just the /np command doesn't work because that's not a thing in lazer anymore?

Yeah. Basically you can send your map and diff to the bot, but yeah, the bot is it doing nothing. But I didn't get what you mean by this: "Just the /np command doesn't work because that's not a thing in lazer anymore?" It is here I guess? At least it works and sends.

AuracleTech commented 11 months ago

But I didn't get what you mean by this: _"Just the /np command d...

You can still use regular commands sent as "message" like !r or !help But you cannot use /np because it's not sent as a message but as its own separate thing

omkelderman commented 11 months ago

/np has always been a non normal message. On the stable client irc bridge its an irc ACTION instead of an PRIVMSG. Now the real question here is what is happening with the lazer messaging system when it gets forwarded somewhere in the osu backend to the irc gateway. That'll need a little bit of investigation.

I'll see what I can find out soon

AlexandraCat commented 11 months ago

So basically you guys mean that you're working on it or something like that? Kinda really want this to work, haha. And I hope not only me so.. Waiting for the results. And speaking about them — any clues how much time it can possibly take?

omkelderman commented 11 months ago

with the current plan from peppy to open up lazer to pp at the end of the year, i'd say we definitely should be ready for that. I don't know how much work this will be as I've not looked into it yet, can be anything from an easy 5min fix to impossible lol. I'll try to find some time to investigate this later today

omkelderman commented 11 months ago

Did some investigation and I found what is likely causing the issue.

In https://github.com/Tillerino/Tillerinobot/blob/master/tillerinobot-irc/src/main/rust/ircc.rs#L131 we parse the incoming IRC message and check for a private action instead of a normal message (as /np responses are wrapped in an action). The /np responses coming from whatever mechanism is being used to forward lazer messages to the irc gateway do not include the 0x01 byte at the end. This is strictly speaking against the IRC spec (at least wireshark tells me that)

IRC PRIVMSG response coming from stable: in song select: while playing:

Same but coming from lazer: in song select: while playing:

you can clearly see wireshark being mad. So I guess peppy probably needs to fix this, but I suppose we can also just accept this malformed request anyway. I am probably gonna send peppy a message about this either way, so @Tillerino your call if you wanna wait for that or just make the msg.ends_with("\u{1}") optional.

Sidenote: the text format of both messages are slightly different, but I doubt that'll be much of a problem as the code that actually parses the text only really cares about the url and I just checked and that code supports both url formats, so that shouldnt be much of a problem.

Tillerino commented 11 months ago

Let's see what peppy or says. This probably doesn't take longer than 5 mins to fix on their end, too. Tbh, I can't really imagine why they wouldn't just do that.

Tillerino commented 11 months ago

Thanks for your investigation <3

Tillerino commented 10 months ago

The upstream issue was closed as fixed. Does this mean that this problem has been solved?

omkelderman commented 10 months ago

When that got closed it wasn't deployed yet. There is no indication (that I know of) that a new bancho update has been deployed. For all I know it is now. So basically we just gotta try and see what happens. And if lazer np still doesn't work properly also repeat my wireshark test to confirm it has been deployed in case there's something I missed and it's more than just that bancho issue

AlexandraCat commented 10 months ago

As I see It works fine now!

Tillerino commented 10 months ago

Excellent! Thanks :)