Add remaining backbone for banning accounts (sort of)
Frontend still doesn't work properly. In particular: 1. Need a way to list bans by account name. 2. Need a way to unban by account name. 3. Really need a way to change the IP on a ban lol. Ban system still needs to be be rebuilt fully, but at least this doesn't necessarily character ban someone if you were going for an IP ban. Fixes #1412
This commit is contained in:
parent
0edfc6834f
commit
718525904a
5 changed files with 60 additions and 11 deletions
|
|
@ -645,7 +645,7 @@ namespace TShockAPI
|
|||
|
||||
try
|
||||
{
|
||||
TShock.Bans.AddBan(ip, name, "", args.Parameters["reason"], true, args.TokenData.Username);
|
||||
TShock.Bans.AddBan2(ip, name, "", "", args.Parameters["reason"], true, args.TokenData.Username);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
@ -1022,7 +1022,7 @@ namespace TShockAPI
|
|||
|
||||
TSPlayer player = (TSPlayer)ret;
|
||||
var reason = null == args.Parameters["reason"] ? "Banned via web" : args.Parameters["reason"];
|
||||
TShock.Bans.AddBan(player.IP, player.Name, "", reason);
|
||||
TShock.Bans.AddBan2(player.IP, player.Name, "", "", reason);
|
||||
TShock.Utils.ForceKick(player, reason, false, true);
|
||||
return RestResponse("Player " + player.Name + " was banned");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue