Remove ban immunity at the command level.
Ban immunity will be managed when a ban is validated
This commit is contained in:
parent
c71cf79125
commit
3e6cdb3c71
2 changed files with 8 additions and 14 deletions
|
|
@ -1636,13 +1636,13 @@ namespace TShockAPI
|
|||
{
|
||||
if (!ConnectionAlive)
|
||||
return true;
|
||||
if (force || !HasPermission(Permissions.immunetoban))
|
||||
if (force)
|
||||
{
|
||||
TShock.Bans.InsertBan($"{Identifiers.IP}{IP}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
TShock.Bans.InsertBan($"{Identifiers.IP}{UUID}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
TShock.Bans.InsertBan($"{Identifier.IP}{IP}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
TShock.Bans.InsertBan($"{Identifier.IP}{UUID}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
if (Account != null)
|
||||
{
|
||||
TShock.Bans.InsertBan($"{Identifiers.Account}{Account.Name}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
TShock.Bans.InsertBan($"{Identifier.Account}{Account.Name}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
}
|
||||
|
||||
Disconnect(string.Format("Banned: {0}", reason));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue