mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
update stats plugin to properly use the new configurable broadcast prefix.
This commit is contained in:
@ -17,6 +17,7 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
class MostKillsCommand : Command
|
||||
{
|
||||
private readonly IDatabaseContextFactory _contextFactory;
|
||||
private readonly CommandConfiguration _config;
|
||||
|
||||
public MostKillsCommand(CommandConfiguration config, ITranslationLookup translationLookup, IDatabaseContextFactory contextFactory) : base(config, translationLookup)
|
||||
{
|
||||
@ -26,12 +27,13 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
Permission = EFClient.Permission.User;
|
||||
|
||||
_contextFactory = contextFactory;
|
||||
_config = config;
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(GameEvent E)
|
||||
{
|
||||
var mostKills = await GetMostKills(StatManager.GetIdForServer(E.Owner), Plugin.Config.Configuration(), _contextFactory, _translationLookup);
|
||||
if (!E.Message.IsBroadcastCommand())
|
||||
if (!E.Message.IsBroadcastCommand(_config.BroadcastCommandPrefix))
|
||||
{
|
||||
foreach (var stat in mostKills)
|
||||
{
|
||||
|
Reference in New Issue
Block a user