1
0
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:
RaidMax
2020-08-01 09:58:23 -05:00
parent 51202e7f8b
commit b044198c6c
13 changed files with 29 additions and 15 deletions

View File

@ -59,6 +59,8 @@ namespace IW4MAdmin.Plugins.Stats.Commands
return mostPlayed;
}
private readonly CommandConfiguration _config;
public MostPlayedCommand(CommandConfiguration config, ITranslationLookup translationLookup) : base(config, translationLookup)
{
Name = "mostplayed";
@ -66,12 +68,14 @@ namespace IW4MAdmin.Plugins.Stats.Commands
Alias = "mp";
Permission = EFClient.Permission.User;
RequiresTarget = false;
_config = config;
}
public override async Task ExecuteAsync(GameEvent E)
{
var topStats = await GetMostPlayed(E.Owner, _translationLookup);
if (!E.Message.IsBroadcastCommand())
if (!E.Message.IsBroadcastCommand(_config.BroadcastCommandPrefix))
{
foreach (var stat in topStats)
{