mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-13 00:28:10 -05:00
add unlink command
fix parsing names with colors codes enabled
This commit is contained in:
18
SharedLibraryCore/Commands/UnlinkClientCommand.cs
Normal file
18
SharedLibraryCore/Commands/UnlinkClientCommand.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibraryCore.Commands
|
||||
{
|
||||
public class UnlinkClientCommand : Command
|
||||
{
|
||||
public UnlinkClientCommand() :
|
||||
base("unlinkclient", Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_UNLINK_CLIENT_DESC"], "uc", EFClient.Permission.Administrator, true)
|
||||
{ }
|
||||
|
||||
public override async Task ExecuteAsync(GameEvent E)
|
||||
{
|
||||
await E.Owner.Manager.GetClientService().UnlinkClient(E.Target.ClientId);
|
||||
E.Origin.Tell(Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_UNLINK_CLIENT_SUCCESS"].FormatExt(E.Target));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user