mirror of
https://github.com/sebastian-heinz/Arrowgene.DragonsDogmaOnline
synced 2026-08-03 11:12:41 -04:00
19 lines
880 B
C#
19 lines
880 B
C#
public class ChatCommand : IChatCommand
|
|
{
|
|
public override AccountStateType AccountState => AccountStateType.User;
|
|
public override string CommandName => "help";
|
|
public override string HelpText => "usage: `/help` - Shows this text";
|
|
|
|
public override void Execute(DdonGameServer server, string[] command, GameClient client, ChatMessage message, List<ChatResponse> responses)
|
|
{
|
|
var disableAccountCheckType = LibDdon.GetSetting<bool>("ChatCommandSettings", "DisableAccountTypeCheck");
|
|
|
|
server.ScriptManager.ChatCommandModule.Commands.Values
|
|
.Where(x => (client.Account.State >= x.AccountState) || disableAccountCheckType)
|
|
.Select(cmd => ChatResponse.ServerChat(client, cmd.HelpText))
|
|
.ToList()
|
|
.ForEach(response => responses.Add(response));
|
|
}
|
|
}
|
|
|
|
return new ChatCommand();
|