Ban rewrite
This commit is contained in:
parent
5af1f8f76a
commit
56de9f6684
9 changed files with 679 additions and 860 deletions
|
|
@ -1638,9 +1638,13 @@ namespace TShockAPI
|
|||
return true;
|
||||
if (force || !HasPermission(Permissions.immunetoban))
|
||||
{
|
||||
string ip = IP;
|
||||
string uuid = UUID;
|
||||
TShock.Bans.AddBan(ip, Name, uuid, "", reason, false, adminUserName);
|
||||
TShock.Bans.InsertBan($"{DB.Ban.Identifiers.IP}{IP}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
TShock.Bans.InsertBan($"{DB.Ban.Identifiers.IP}{UUID}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
if (Account != null)
|
||||
{
|
||||
TShock.Bans.InsertBan($"{DB.Ban.Identifiers.Account}{Account.Name}", reason, adminUserName, DateTime.UtcNow, DateTime.MaxValue);
|
||||
}
|
||||
|
||||
Disconnect(string.Format("Banned: {0}", reason));
|
||||
string verb = force ? "force " : "";
|
||||
if (string.IsNullOrWhiteSpace(adminUserName))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue