1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

tweak linking behavior

This commit is contained in:
RaidMax
2021-08-21 10:40:03 -05:00
parent 7d30d80684
commit bc893738e1
4 changed files with 65 additions and 37 deletions

View File

@ -594,22 +594,13 @@ namespace SharedLibraryCore.Database.Models
// we want to kick them if any account is banned
if (banPenalty != null)
{
if (enableImplicitLinking)
{
if (Level != Permission.Banned)
{
Utilities.DefaultLogger.LogInformation(
"Client {client} is banned, but using a new GUID, we we're updating their level and kicking them",
ToString());
await SetLevel(Permission.Banned, autoKickClient).WaitAsync(Utilities.DefaultCommandTimeout,
CurrentServer.Manager.CancellationToken);
}
}
if (Level != Permission.Banned)
{
Ban(banPenalty.Offense, autoKickClient, true);
return false;
Utilities.DefaultLogger.LogInformation(
"Client {client} has a ban penalty, but they're using a new GUID, we we're updating their level and kicking them",
ToString());
await SetLevel(Permission.Banned, autoKickClient).WaitAsync(Utilities.DefaultCommandTimeout,
CurrentServer.Manager.CancellationToken);
}
Utilities.DefaultLogger.LogInformation("Kicking {client} because they are banned", ToString());