Compare commits
4 Commits
2.3-Prerel
...
2.3-Prerel
Author | SHA1 | Date | |
---|---|---|---|
9f16d27630 | |||
c636cc3e74 | |||
4d9356982a | |||
fa75478998 |
@ -331,18 +331,18 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
|
||||
if (!shouldIgnoreDetection)
|
||||
{
|
||||
validButtonHitCount++;
|
||||
}
|
||||
|
||||
double lastDiff = hit.TimeOffset - hit.TimeSinceLastAttack;
|
||||
if (validButtonHitCount > 0 && lastDiff <= 0)
|
||||
{
|
||||
results.Add(new DetectionPenaltyResult()
|
||||
double lastDiff = hit.TimeOffset - hit.TimeSinceLastAttack;
|
||||
if (validButtonHitCount > 0 && lastDiff <= 0)
|
||||
{
|
||||
ClientPenalty = EFPenalty.PenaltyType.Ban,
|
||||
Value = lastDiff,
|
||||
HitCount = HitCount,
|
||||
Type = DetectionType.Button
|
||||
});
|
||||
results.Add(new DetectionPenaltyResult()
|
||||
{
|
||||
ClientPenalty = EFPenalty.PenaltyType.Ban,
|
||||
Value = lastDiff,
|
||||
HitCount = HitCount,
|
||||
Type = DetectionType.Button
|
||||
});
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -633,7 +633,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
|
||||
try
|
||||
{
|
||||
if (detectionTypes[server.EndPoint].Contains(detectionType))
|
||||
if (!detectionTypes[server.EndPoint].Contains(detectionType))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -239,6 +239,42 @@ namespace SharedLibraryCore.Commands
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prints out a message to all clients on all servers
|
||||
/// </summary>
|
||||
public class SayAllCommand : Command
|
||||
{
|
||||
public SayAllCommand(CommandConfiguration config, ITranslationLookup translationLookup) : base(config, translationLookup)
|
||||
{
|
||||
Name = "sayall";
|
||||
Description = _translationLookup["COMMANDS_SAY_ALL_DESC"];
|
||||
Alias = "sa";
|
||||
Permission = Permission.Moderator;
|
||||
RequiresTarget = false;
|
||||
Arguments = new[]
|
||||
{
|
||||
new CommandArgument()
|
||||
{
|
||||
Name = _translationLookup["COMMANDS_ARGS_MESSAGE"],
|
||||
Required = true
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public override Task ExecuteAsync(GameEvent E)
|
||||
{
|
||||
string message = _translationLookup["COMMANDS_SAY_ALL_MESSAGE_FORMAT"].FormatExt(E.Origin.Name, E.Data);
|
||||
|
||||
foreach (var server in E.Owner.Manager.GetServers())
|
||||
{
|
||||
server.Broadcast(message, E.Origin);
|
||||
}
|
||||
|
||||
E.Origin.Tell(_translationLookup["COMMANDS_SAY_SUCCESS"]);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Temporarily bans a client
|
||||
/// </summary>
|
||||
|
@ -50,7 +50,7 @@
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (Model.ActivePenalty != null)
|
||||
@if (Model.ActivePenalty != null && (Model.ActivePenalty.Type != EFPenalty.PenaltyType.Flag || ViewBag.Authorized))
|
||||
{
|
||||
<div class="font-weight-bold h4 mb-0 penalties-color-@Model.ActivePenalty.Type.ToString().ToLower()">
|
||||
@foreach (var result in Utilities.SplitTranslationTokens(translationKey))
|
||||
|
@ -28,7 +28,7 @@
|
||||
else if (match.MatchValue == "reason")
|
||||
{
|
||||
<span class="text-white">
|
||||
@if (ViewBag.Authorized && !string.IsNullOrEmpty(Model.AutomatedOffense) && Model.PenaltyType != SharedLibraryCore.Database.Models.EFPenalty.PenaltyType.Warning)
|
||||
@if (ViewBag.Authorized && !string.IsNullOrEmpty(Model.AutomatedOffense) && Model.PenaltyType != SharedLibraryCore.Database.Models.EFPenalty.PenaltyType.Warning && Model.PenaltyType != SharedLibraryCore.Database.Models.EFPenalty.PenaltyType.Kick)
|
||||
{
|
||||
<span>@Utilities.FormatExt(ViewBag.Localization["WEBFRONT_PROFILE_ANTICHEAT_DETECTION"], Model.AutomatedOffense)</span>
|
||||
<span class="oi oi-list-rich align-top text-primary automated-penalty-info-detailed" data-penalty-id="@Model.PenaltyId" style="margin-top: 0.125rem;" title="@ViewBag.Localization["WEBFRONT_CLIENT_META_AC_METRIC"]"></span>
|
||||
|
Reference in New Issue
Block a user