1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-11 15:52:25 -05:00

Using Code from EFPerformanceBucket for references

This commit is contained in:
Ayymoss
2024-09-07 18:41:18 +01:00
parent 79bd6ca8e1
commit 98e2be8623
17 changed files with 154 additions and 103 deletions

View File

@ -47,7 +47,7 @@ namespace SharedLibraryCore.Configuration
[LocalizedDisplayName("WEBFRONT_CONFIGURATION_SERVER_CUSTOM_HOSTNAME")]
[ConfigurationOptional]
public string CustomHostname { get; set; }
public string PerformanceBucket { get; set; }
public string PerformanceBucketCode { get; set; }
public IBaseConfiguration Generate()
{

View File

@ -45,9 +45,9 @@ namespace SharedLibraryCore.Interfaces
/// Retrieves the number of ranked clients for given server id
/// </summary>
/// <param name="serverId">ServerId to query on</param>
/// <param name="performanceBucket"></param>
/// <param name="performanceBucketCode"></param>
/// <param name="token">CancellationToken</param>
/// <returns></returns>
Task<int> RankedClientsCountAsync(long? serverId = null, string performanceBucket = null, CancellationToken token = default);
Task<int> RankedClientsCountAsync(long? serverId = null, string performanceBucketCode = null, CancellationToken token = default);
}
}

View File

@ -83,7 +83,7 @@ namespace SharedLibraryCore
RConConnectionFactory = rconConnectionFactory;
ServerLogger = logger;
DefaultSettings = serviceProvider.GetRequiredService<DefaultSettings>();
PerformanceBucket = ServerConfig.PerformanceBucket;
PerformanceCode = ServerConfig.PerformanceBucketCode;
InitializeTokens();
InitializeAutoMessages();
}
@ -164,7 +164,7 @@ namespace SharedLibraryCore
public bool IsInitialized { get; set; }
public int Port { get; protected set; }
public int ListenPort => Port;
public string PerformanceBucket { get; init; }
public string PerformanceCode { get; init; }
public abstract Task Kick(string reason, EFClient target, EFClient origin, EFPenalty originalPenalty);
public abstract Task<string[]> ExecuteCommandAsync(string command, CancellationToken token = default);
public abstract Task SetDvarAsync(string name, object value, CancellationToken token = default);