using SharedLibraryCore;
using SharedLibraryCore.Commands;
using SharedLibraryCore.Configuration;
using SharedLibraryCore.Database.Models;
using SharedLibraryCore.Interfaces;
using SharedLibraryCore.Interfaces.Events;
using System.Threading.Tasks;
namespace ClanTagRankCommands.Commands
{
///
/// Example script command
///
///
public class GameInterfaceReconnectCommand : Command
{
private readonly IMetaServiceV2 _metaService;
//private readonly IConfigurationHandler _configurationHandler;
private ClanTagConfiguration Config;
public GameInterfaceReconnectCommand(CommandConfiguration config, ITranslationLookup lookup, ClanTagConfiguration _Config, IMetaServiceV2 metaService, IConfigurationHandlerFactory configurationHandlerFactory) : base(config, lookup)
{
_metaService = metaService;
Config = _Config;
Name = "GameInterfaceReconnect";
Description = "set a user's clan tag Rank (does not give permissions)";
Alias = "gir";
Permission = EFClient.Permission.Administrator;
RequiresTarget = false;
//Arguments = new[]
//{
// new CommandArgument()
// {
// Name = "rank",
// Required = true
// }
//};
}
public override Task ExecuteAsync(GameEvent E)
{
var gir = new GameEvent()
{
Origin = Utilities.IW4MAdminClient(),
Owner = E.Owner,
Type = GameEvent.EventType.Other,
Subtype = "ScriptReconnect",
};
E.Owner.ExecuteEvent(gir);
return Task.CompletedTask;
}
}
}