1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

update stats plugin for server caching and better DI usage

This commit is contained in:
RaidMax
2023-04-05 10:15:10 -05:00
parent ebe69a94ad
commit 8d2ac47756
8 changed files with 56 additions and 139 deletions

View File

@ -13,8 +13,8 @@ namespace IW4MAdmin.Plugins.Stats.Commands
{
public static async Task<List<string>> GetTopStats(IGameServer server, ITranslationLookup translationLookup, StatManager statManager)
{
var serverId = StatManager.GetIdForServer(server);
var topStatsText = new List<string>()
var serverId = server.LegacyDatabaseId;
var topStatsText = new List<string>
{
$"(Color::Accent)--{translationLookup["PLUGINS_STATS_COMMANDS_TOP_TEXT"]}--"
};
@ -29,7 +29,7 @@ namespace IW4MAdmin.Plugins.Stats.Commands
// no one qualified
if (topStatsText.Count == 1)
{
topStatsText = new List<string>()
topStatsText = new List<string>
{
translationLookup["PLUGINS_STATS_TEXT_NOQUALIFY"]
};