1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 15:27:30 +08:00

Adjust log message and comment

This commit is contained in:
Salman Ahmed 2024-03-11 01:01:26 +03:00
parent 98ca021e66
commit 283de215d3

View File

@ -189,20 +189,14 @@ namespace osu.Desktop
private void onJoin(object sender, JoinMessage args)
{
game.Window?.Raise();
Logger.Log($"Received room secret from Discord RPC Client: {args.Secret}", LoggingTarget.Network, LogLevel.Debug);
// Stable and Lazer share the same Discord client ID, meaning they can accept join requests from each other.
Logger.Log($"Received room secret from Discord RPC Client: \"{args.Secret}\"", LoggingTarget.Network, LogLevel.Debug);
// Stable and lazer share the same Discord client ID, meaning they can accept join requests from each other.
// Since they aren't compatible in multi, see if stable's format is being used and log to avoid confusion.
// https://discord.com/channels/188630481301012481/188630652340404224/1214697229063946291
if (args.Secret[0] != '{')
if (args.Secret[0] != '{' || !tryParseRoomSecret(args.Secret, out long roomId, out string? password))
{
Logger.Log("osu!stable rooms are not compatible with lazer.", LoggingTarget.Network, LogLevel.Important);
return;
}
if (!tryParseRoomSecret(args.Secret, out long roomId, out string? password))
{
Logger.Log("Could not join multiplayer room.", LoggingTarget.Network, LogLevel.Important);
Logger.Log("Could not join multiplayer room, invitation is invalid or incompatible.", LoggingTarget.Network, LogLevel.Important);
return;
}
@ -211,7 +205,7 @@ namespace osu.Desktop
{
game.PresentMultiplayerMatch(room, password);
});
request.Failure += _ => Logger.Log($"Could not find room {roomId} from Discord RPC Client", LoggingTarget.Network, LogLevel.Important);
request.Failure += _ => Logger.Log($"Could not join multiplayer room, room could not be found (room ID: {roomId}).", LoggingTarget.Network, LogLevel.Important);
api.Queue(request);
}