mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 18:33:22 +08:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into multi-room-update
This commit is contained in:
commit
0ec45e2a8b
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user