Compare commits
6 Commits
integratio
...
eventing
Author | SHA1 | Date | |
---|---|---|---|
f99cdb650e | |||
abbe33f22a | |||
6d57d209b0 | |||
03636792e3 | |||
48b52e8c58 | |||
231f77bc77 |
@ -11,9 +11,9 @@ namespace ClanTagRankCommands
|
||||
public static string Truncate(this string input, int strLength)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input)) return input;
|
||||
return input.Length <= strLength ? input : input.Substring(0, strLength);
|
||||
return input.Length <= strLength ? input : input[..strLength];
|
||||
}
|
||||
public static string ClanTag(this EFClient.Permission level, Configuration Config)
|
||||
public static string ClanTag(this EFClient.Permission level, ClanTagConfiguration Config)
|
||||
{
|
||||
string rankName;
|
||||
|
||||
|
@ -2,11 +2,13 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ApplicationIcon />
|
||||
<StartupObject />
|
||||
<Configurations>Debug;Release;Prerelease</Configurations>
|
||||
<LangVersion>10</LangVersion>
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<SignAssembly>False</SignAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -16,7 +18,12 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="RaidMax.IW4MAdmin.SharedLibraryCore" Version="2022.10.13.1" PrivateAssets="All" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="RaidMax.IW4MAdmin.SharedLibraryCore" Version="2024.6.29.807" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
|
66
Commands/GameInterfaceReconnectCommand.cs
Normal file
66
Commands/GameInterfaceReconnectCommand.cs
Normal file
@ -0,0 +1,66 @@
|
||||
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
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Example script command
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
public class GameInterfaceReconnectCommand : Command
|
||||
{
|
||||
|
||||
private readonly IMetaServiceV2 _metaService;
|
||||
//private readonly IConfigurationHandler<ClanTagConfiguration> _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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@ using SharedLibraryCore.Commands;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Interfaces.Events;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@ -19,20 +20,20 @@ namespace ClanTagRankCommands.Commands
|
||||
readonly string rank = "rank";
|
||||
string rank_string;
|
||||
private readonly IMetaServiceV2 _metaService;
|
||||
private readonly IConfigurationHandler<Configuration> _configurationHandler;
|
||||
private Configuration Config;
|
||||
//private readonly IConfigurationHandler<ClanTagConfiguration> _configurationHandler;
|
||||
private ClanTagConfiguration Config;
|
||||
|
||||
|
||||
public SetRankCommand(CommandConfiguration config, ITranslationLookup lookup, IMetaServiceV2 metaService, IConfigurationHandlerFactory configurationHandlerFactory) : base(config, lookup)
|
||||
public SetRankCommand(CommandConfiguration config, ITranslationLookup lookup, ClanTagConfiguration _Config, IMetaServiceV2 metaService, IConfigurationHandlerFactory configurationHandlerFactory) : base(config, lookup)
|
||||
{
|
||||
_metaService = metaService;
|
||||
_configurationHandler = configurationHandlerFactory.GetConfigurationHandler<Configuration>("ClanTagRankCommands");
|
||||
if (_configurationHandler.Configuration() == null)
|
||||
{
|
||||
_configurationHandler.Set((Configuration)new Configuration().Generate());
|
||||
_configurationHandler.Save();
|
||||
}
|
||||
Config = _configurationHandler.Configuration();
|
||||
//_configurationHandler = configurationHandlerFactory.GetConfigurationHandler<ClanTagConfiguration>("ClanTagRankCommands");
|
||||
//if (_configurationHandler.Configuration() == null)
|
||||
//{
|
||||
// _configurationHandler.Set((ClanTagConfiguration)new ClanTagConfiguration().Generate());
|
||||
// _configurationHandler.Save();
|
||||
//}
|
||||
Config = _Config;
|
||||
|
||||
Name = "SetRank";
|
||||
Description = "set a user's clan tag Rank (does not give permissions)";
|
||||
@ -49,7 +50,7 @@ namespace ClanTagRankCommands.Commands
|
||||
};
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(GameEvent E)
|
||||
public override async Task ExecuteAsync(GameEvent E )
|
||||
{
|
||||
//var S = E.Owner;
|
||||
rank_string = "none";
|
||||
|
@ -3,7 +3,7 @@ using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace ClanTagRankCommands
|
||||
{
|
||||
public class Configuration : IBaseConfiguration
|
||||
public class ClanTagConfiguration : IBaseConfiguration
|
||||
{
|
||||
internal const string _name = "IW4MAdmin";
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
using SharedLibraryCore;
|
||||
using Serilog.Debugging;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Events.Game;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using EventGeneratorCallback = System.ValueTuple<string, string,
|
||||
System.Func<string, SharedLibraryCore.Interfaces.IEventParserConfiguration,
|
||||
SharedLibraryCore.GameEvent,
|
||||
@ -13,6 +16,8 @@ namespace IW4MAdmin.Plugins.ClanTagRankCommands.Events
|
||||
{
|
||||
|
||||
private const string EVENT_RC = "RC";
|
||||
private const string EVENT_ScriptBan = "ScriptBan";
|
||||
private const string EVENT_ScriptReconnect = "ScriptReconnect";
|
||||
|
||||
/// <summary>
|
||||
/// this is a custom event printed out by _clientids.gsc (used for recording highest personal round records)
|
||||
@ -37,6 +42,50 @@ namespace IW4MAdmin.Plugins.ClanTagRankCommands.Events
|
||||
}
|
||||
);
|
||||
}
|
||||
private EventGeneratorCallback ScriptBan()
|
||||
{
|
||||
return (EVENT_ScriptBan, EVENT_ScriptBan, (eventLine, _, _) =>
|
||||
{
|
||||
string[] lineSplit = eventLine.Split(";");
|
||||
|
||||
|
||||
long originId = lineSplit[1].ConvertGuidToLong(NumberStyles.Integer);
|
||||
int clientnum = int.Parse(lineSplit[2]);
|
||||
var scriptBan = new ScriptBanEvent
|
||||
|
||||
{
|
||||
Type = GameEvent.EventType.Other,
|
||||
Subtype = EVENT_ScriptBan,
|
||||
Origin = Utilities.IW4MAdminClient(),
|
||||
Target = new EFClient { NetworkId = originId, Name = lineSplit[3], ClientNumber = clientnum },
|
||||
ScriptData = eventLine
|
||||
};
|
||||
return scriptBan;
|
||||
}
|
||||
);
|
||||
}
|
||||
private EventGeneratorCallback ScriptReconnect()
|
||||
{
|
||||
return (EVENT_ScriptReconnect, EVENT_ScriptReconnect, (eventLine, _, _) =>
|
||||
{
|
||||
string[] lineSplit = eventLine.Split(";");
|
||||
|
||||
|
||||
//long originId = lineSplit[1].ConvertGuidToLong(NumberStyles.Integer);
|
||||
//int clientnum = int.Parse(lineSplit[2]);
|
||||
var ScriptReconnect = new ScriptReconnectEvent
|
||||
|
||||
{
|
||||
Type = GameEvent.EventType.Other,
|
||||
Subtype = EVENT_ScriptReconnect,
|
||||
Origin = Utilities.IW4MAdminClient(),
|
||||
//Target = new EFClient { NetworkId = originId, Name = lineSplit[3], ClientNumber = clientnum },
|
||||
ScriptData = eventLine
|
||||
};
|
||||
return ScriptReconnect;
|
||||
}
|
||||
);
|
||||
}
|
||||
//private const string EVENT_RoundNumber = "RoundNumber";
|
||||
|
||||
///// <summary>
|
||||
@ -60,8 +109,15 @@ namespace IW4MAdmin.Plugins.ClanTagRankCommands.Events
|
||||
public IEnumerable<EventGeneratorCallback> Events =>
|
||||
new[]
|
||||
{
|
||||
RC(),
|
||||
RC(),ScriptBan(), ScriptReconnect(),
|
||||
|
||||
};
|
||||
|
||||
public class ScriptBanEvent : GameScriptEvent
|
||||
{
|
||||
}
|
||||
public class ScriptReconnectEvent : GameScriptEvent
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
159
Plugin.cs
159
Plugin.cs
@ -4,25 +4,33 @@ using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Helpers;
|
||||
|
||||
using SharedLibraryCore.Commands;
|
||||
using SharedLibraryCore.Events.Management;
|
||||
using SharedLibraryCore.Interfaces.Events;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
using Data.Models;
|
||||
using System;
|
||||
using SharedLibraryCore.Commands;
|
||||
using JsonSerializer = System.Text.Json.JsonSerializer;
|
||||
using System.Linq;
|
||||
using Serilog.Core;
|
||||
using EFClient = Data.Models.Client.EFClient;
|
||||
using static IW4MAdmin.Plugins.ClanTagRankCommands.Events.Script;
|
||||
using SharedLibraryCore.Events.Game;
|
||||
using SharedLibraryCore.Events.Server;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
|
||||
|
||||
namespace ClanTagRankCommands
|
||||
{
|
||||
|
||||
public class Plugin : IPlugin
|
||||
public class Plugin : IPluginV2
|
||||
{
|
||||
private readonly IConfigurationHandler<Configuration> _configurationHandler;
|
||||
private readonly ILogger _logger;
|
||||
private Configuration Config;
|
||||
//private ClanTagConfiguration Config;
|
||||
//readonly string rank = "rank";
|
||||
//string rankName = "none";
|
||||
private readonly IInteractionRegistration _interactionRegistration;
|
||||
@ -34,35 +42,52 @@ namespace ClanTagRankCommands
|
||||
|
||||
public string Name => "ClanTagRankCommands";
|
||||
|
||||
public float Version => 1.5f;
|
||||
//public float Version => 1.5f;
|
||||
|
||||
public string Author => "INSANEMODE";
|
||||
|
||||
string IModularAssembly.Version => "2.0";
|
||||
|
||||
private readonly IMetaServiceV2 _metaService;
|
||||
|
||||
public static string DonatorKey = "IW4MDonator";
|
||||
|
||||
public static DataManager DataManager;
|
||||
|
||||
public Plugin(IMetaServiceV2 metaService, IConfigurationHandlerFactory configurationHandlerFactory, ILogger<Plugin> logger, IInteractionRegistration interactionRegistration, IRemoteCommandService remoteCommandService)
|
||||
public Plugin(IMetaServiceV2 metaService, ClanTagConfiguration Config, ILogger<Plugin> logger, IInteractionRegistration interactionRegistration, IRemoteCommandService remoteCommandService)
|
||||
{
|
||||
|
||||
IManagementEventSubscriptions.Load += OnLoad;
|
||||
IManagementEventSubscriptions.Unload += OnUnloadAsync;
|
||||
IGameEventSubscriptions.ScriptEventTriggered += OnScriptEvent;
|
||||
|
||||
_remoteCommandService = remoteCommandService;
|
||||
_logger = logger;
|
||||
_metaService = metaService;
|
||||
_configurationHandler = (IConfigurationHandler<Configuration>)configurationHandlerFactory.GetConfigurationHandler<Configuration>("ClanTagRankCommands");
|
||||
_interactionRegistration = interactionRegistration;
|
||||
DataManager = new DataManager(metaService, logger);
|
||||
}
|
||||
public Task OnLoadAsync(IManager manager)// => Task.CompletedTask;
|
||||
{
|
||||
if (_configurationHandler.Configuration() == null)
|
||||
IManagementEventSubscriptions.ClientStateDisposed += async (clientEvent, token) =>
|
||||
{
|
||||
_configurationHandler.Set((Configuration)new Configuration().Generate());
|
||||
_configurationHandler.Save();
|
||||
}
|
||||
Config = _configurationHandler.Configuration();
|
||||
if ((clientEvent.Client.CurrentServer.Hostname.Contains("Donator") || clientEvent.Client.CurrentServer.Hostname.Contains("Test")) && clientEvent.Client.Tag == "Guest")
|
||||
{
|
||||
Console.WriteLine("Guest disconnected, removing guest tag.");
|
||||
_logger.LogInformation("Guest disconnected, removing guest tag.");
|
||||
clientEvent.Client.Tag = null;
|
||||
await _metaService.RemovePersistentMeta(EFMeta.ClientTagV2, clientEvent.Client.ClientId,
|
||||
token);
|
||||
}
|
||||
};
|
||||
}
|
||||
public static void RegisterDependencies(IServiceCollection serviceCollection)
|
||||
{
|
||||
serviceCollection.AddConfiguration<ClanTagConfiguration>("ClanTagRankCommands");
|
||||
|
||||
}
|
||||
private Task OnLoad(IManager manager, CancellationToken token)
|
||||
{
|
||||
|
||||
string version = manager.Version;
|
||||
string str = string.Format("Loaded {0} ({1}) by {2} in {3} ({4})!", (object)((IPlugin)this).Name, (object)((IPlugin)this).Version, (object)((IPlugin)this).Author, (object)"IW4MAdmin", (object)version);
|
||||
string str = string.Format("Loaded {0} ({1}) by {2} in {3} ({4})!", (object)((IPluginV2)this).Name, (object)((IPluginV2)this).Version, (object)((IPluginV2)this).Author, (object)"IW4MAdmin", (object)version);
|
||||
_logger.LogInformation(str);
|
||||
_interactionRegistration.RegisterInteraction(DonatorInteraction, async (clientId, game, token) =>
|
||||
{
|
||||
@ -91,7 +116,7 @@ namespace ClanTagRankCommands
|
||||
{ "Name", "Set Donator rank" },
|
||||
{ "ShouldRefresh", true.ToString() }
|
||||
},
|
||||
MinimumPermission = Data.Models.Client.EFClient.Permission.Administrator,
|
||||
MinimumPermission = EFClient.Permission.Administrator,
|
||||
Source = Name,
|
||||
Enabled = true,
|
||||
PermissionAccess = "read",
|
||||
@ -112,7 +137,7 @@ namespace ClanTagRankCommands
|
||||
{ "Name", "UnSet Donator rank" },
|
||||
{ "ShouldRefresh", true.ToString() }
|
||||
},
|
||||
MinimumPermission = Data.Models.Client.EFClient.Permission.Administrator,
|
||||
MinimumPermission = EFClient.Permission.Administrator,
|
||||
Source = Name,
|
||||
Enabled = true,
|
||||
PermissionAccess = "read",
|
||||
@ -161,7 +186,7 @@ namespace ClanTagRankCommands
|
||||
{ "Name", "Temporarily invite guest to donator server" },
|
||||
{ "ShouldRefresh", true.ToString() }
|
||||
},
|
||||
MinimumPermission = Data.Models.Client.EFClient.Permission.Trusted,
|
||||
MinimumPermission = EFClient.Permission.Trusted,
|
||||
Source = Name,
|
||||
Enabled = true,
|
||||
PermissionAccess = "read",
|
||||
@ -182,7 +207,7 @@ namespace ClanTagRankCommands
|
||||
{ "Name", "Cancel guest invite" },
|
||||
{ "ShouldRefresh", true.ToString() }
|
||||
},
|
||||
MinimumPermission = Data.Models.Client.EFClient.Permission.Trusted,
|
||||
MinimumPermission = EFClient.Permission.Trusted,
|
||||
Source = Name,
|
||||
Enabled = true,
|
||||
PermissionAccess = "read",
|
||||
@ -193,24 +218,93 @@ namespace ClanTagRankCommands
|
||||
});
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
public async Task OnEventAsync(GameEvent E, Server S)// => Task.CompletedTask;
|
||||
|
||||
private Task OnScriptEvent(GameScriptEvent scriptEvent, CancellationToken token)
|
||||
{
|
||||
if (E.Type == GameEvent.EventType.Disconnect && (S.Hostname.Contains("Donator") || S.Hostname.Contains("Test")) && E.Origin.Tag == "Guest")
|
||||
if (scriptEvent is not ScriptBanEvent ScriptBan)
|
||||
{
|
||||
E.Origin.Tag = null;
|
||||
await _metaService.RemovePersistentMeta(EFMeta.ClientTagV2, E.Origin.ClientId,
|
||||
E.Owner.Manager.CancellationToken);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
}
|
||||
public Task OnTickAsync(Server S)// =>
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] lineSplit = ScriptBan.ScriptData.Split(";");
|
||||
var sender = Utilities.IW4MAdminClient(ScriptBan.Owner);
|
||||
sender.AdministeredPenalties = new List<EFPenalty>
|
||||
{
|
||||
new()
|
||||
{
|
||||
|
||||
AutomatedOffense = $"Profanity Filter Match: {lineSplit[4]} - {string.Join(",", lineSplit[5])}"
|
||||
}
|
||||
};
|
||||
SharedLibraryCore.Database.Models.EFClient efClient = (SharedLibraryCore.Database.Models.EFClient)null;
|
||||
string rule = ScriptBan.Owner.Manager.GetApplicationSettings().Configuration().GlobalRules.Where(rule => rule.Contains("hate")).FirstOrDefault().ToString();
|
||||
efClient = ScriptBan.Owner.GetClientsAsList().First<SharedLibraryCore.Database.Models.EFClient>((Func<SharedLibraryCore.Database.Models.EFClient, bool>)(_client => _client.NetworkId == ScriptBan.Target.NetworkId));
|
||||
efClient.Ban($"Profanity filter Racism match - -{rule}", sender, false);
|
||||
|
||||
//ScriptBan.Owner.Ban("Blatent racism match", ScriptBan.Target., sender);
|
||||
|
||||
}
|
||||
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "Could not parse ScriptBan Event: {Data}", e.Data);
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
||||
}
|
||||
|
||||
public Task OnUnloadAsync() //=>
|
||||
//public async Task OnDisconnect(GameEvent E, Server S)// => Task.CompletedTask;
|
||||
//{
|
||||
// if (E.Type == GameEventV2.EventType.Disconnect && (S.Hostname.Contains("Donator") || S.Hostname.Contains("Test")) && E.Origin.Tag == "Guest")
|
||||
// {
|
||||
// Console.WriteLine("Guest disconnected, removing guest tag.");
|
||||
// _logger.LogInformation("Guest disconnected, removing guest tag.");
|
||||
// E.Origin.Tag = null;
|
||||
// await _metaService.RemovePersistentMeta(EFMeta.ClientTagV2, E.Origin.ClientId,
|
||||
// E.Owner.Manager.CancellationToken);
|
||||
// }
|
||||
// else if (E.Type == GameEventV2.EventType.Other && (S.Hostname.Contains("Donator") || S.Hostname.Contains("Test")) && E.Origin.Tag == "Guest")
|
||||
// {
|
||||
// Console.WriteLine("Guest triggered event of type Other, removing guest tag.");
|
||||
// _logger.LogInformation("Guest triggered event of type Other, removing guest tag.");
|
||||
// E.Origin.Tag = null;
|
||||
// await _metaService.RemovePersistentMeta(EFMeta.ClientTagV2, E.Origin.ClientId,
|
||||
// E.Owner.Manager.CancellationToken);
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
//public async Task OnEventAsync(GameEventV2 E, Server S)// => Task.CompletedTask;
|
||||
//{
|
||||
// if (E.Type == GameEventV2.EventType.Disconnect && (S.Hostname.Contains("Donator") || S.Hostname.Contains("Test")) && E.Origin.Tag == "Guest")
|
||||
// {
|
||||
// Console.WriteLine("Guest disconnected, removing guest tag.");
|
||||
// _logger.LogInformation("Guest disconnected, removing guest tag.");
|
||||
// E.Origin.Tag = null;
|
||||
// await _metaService.RemovePersistentMeta(EFMeta.ClientTagV2, E.Origin.ClientId,
|
||||
// E.Owner.Manager.CancellationToken);
|
||||
// }
|
||||
// else if (E.Type == GameEventV2.EventType.Other && (S.Hostname.Contains("Donator") || S.Hostname.Contains("Test")) && E.Origin.Tag == "Guest")
|
||||
// {
|
||||
// Console.WriteLine("Guest triggered event of type Other, removing guest tag.");
|
||||
// _logger.LogInformation("Guest triggered event of type Other, removing guest tag.");
|
||||
// E.Origin.Tag = null;
|
||||
// await _metaService.RemovePersistentMeta(EFMeta.ClientTagV2, E.Origin.ClientId,
|
||||
// E.Owner.Manager.CancellationToken);
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
//public Task OnTickAsync(Server S)// =>
|
||||
//{
|
||||
|
||||
// return Task.CompletedTask;
|
||||
|
||||
//}
|
||||
|
||||
private Task OnUnloadAsync(IManager manager, CancellationToken token) //=>
|
||||
{
|
||||
|
||||
_interactionRegistration.UnregisterInteraction(DonatorInteraction);
|
||||
@ -218,11 +312,10 @@ namespace ClanTagRankCommands
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public static class yadb
|
||||
{
|
||||
public static Task notifyYADB(string message, string title, string reason, string icon, Server S, EFClient OriginClient, EFClient TargetClient)
|
||||
public static Task notifyYADB(string message, string title, string reason, string icon, Server S, SharedLibraryCore.Database.Models.EFClient OriginClient, SharedLibraryCore.Database.Models.EFClient TargetClient)
|
||||
{
|
||||
string json = "";
|
||||
using (var stream = new System.IO.MemoryStream())
|
||||
|
Reference in New Issue
Block a user