1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 05:42:54 +08:00

Merge remote-tracking branch 'refs/remotes/ppy/master' into multi-room-update

This commit is contained in:
Andrei Zavatski 2019-08-08 11:54:11 +03:00
commit 0ec45e2a8b

View File

@ -213,8 +213,27 @@ namespace osu.Game.Online.Chat
PostMessage(content, true); PostMessage(content, true);
break; break;
case "join":
if (string.IsNullOrWhiteSpace(content))
{
target.AddNewMessages(new ErrorMessage("Usage: /join [channel]"));
break;
}
var channel = availableChannels.Where(c => c.Name == content || c.Name == $"#{content}").FirstOrDefault();
if (channel == null)
{
target.AddNewMessages(new ErrorMessage($"Channel '{content}' not found."));
break;
}
JoinChannel(channel);
CurrentChannel.Value = channel;
break;
case "help": case "help":
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action]")); target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action], /join [channel]"));
break; break;
default: default: