Adds /me command. (#414)

* Adds /me command.

* Update Content.Server/Chat/ChatManager.cs

Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
Víctor Aguilera Puerto
2019-10-30 21:49:07 +01:00
committed by Pieter-Jan Briers
parent 12cf5559c2
commit 7d307832a0
6 changed files with 75 additions and 0 deletions

View File

@@ -28,6 +28,28 @@ namespace Content.Server.Chat
}
}
internal class MeCommand : IClientCommand
{
public string Command => "me";
public string Description => "Perform an action.";
public string Help => "me <text>";
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
{
if (player.Status != SessionStatus.InGame || !player.AttachedEntityUid.HasValue)
return;
if (args.Length < 1)
return;
var chat = IoCManager.Resolve<IChatManager>();
var action = string.Join(" ", args);
chat.EntityMe(player.AttachedEntity, action);
}
}
internal class OOCCommand : IClientCommand
{
public string Command => "ooc";