mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 07:33:12 +08:00
add /chat command
This commit is contained in:
parent
9288ca1191
commit
4c006333e0
@ -256,8 +256,21 @@ namespace osu.Game.Online.Chat
|
|||||||
JoinChannel(channel);
|
JoinChannel(channel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "chat":
|
||||||
|
if (string.IsNullOrWhiteSpace(content))
|
||||||
|
{
|
||||||
|
target.AddNewMessages(new ErrorMessage("Usage: /chat [user]"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
var request = new GetUserRequest(content);
|
||||||
|
request.Success += u => OpenPrivateChannel(u);
|
||||||
|
request.Failure += _ => target.AddNewMessages(new ErrorMessage("User not found."));
|
||||||
|
api.Queue(request);
|
||||||
|
break;
|
||||||
|
|
||||||
case "help":
|
case "help":
|
||||||
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action], /join [channel], /np"));
|
target.AddNewMessages(new InfoMessage("Supported commands: /help, /me [action], /join [channel], /chat [user], /np"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user