Remove Utils.ForceKick; use TSPlayer.Kick.
Some anti-cheat calls were changed to "You have been Bounced." I don't think we need to tell clients why they were disconnected so they can tune their hacks better.
This commit is contained in:
parent
9e91db9ea4
commit
1ea04ffd4f
6 changed files with 28 additions and 38 deletions
|
|
@ -982,7 +982,7 @@ namespace TShockAPI
|
|||
return ret;
|
||||
|
||||
TSPlayer player = (TSPlayer)ret;
|
||||
TShock.Utils.ForceKick(player, null == args.Parameters["reason"] ? "Kicked via web" : args.Parameters["reason"], false, true);
|
||||
player.Kick(null == args.Parameters["reason"] ? "Kicked via web" : args.Parameters["reason"], false, true, null, true);
|
||||
return RestResponse("Player " + player.Name + " was kicked");
|
||||
}
|
||||
|
||||
|
|
@ -1002,7 +1002,7 @@ namespace TShockAPI
|
|||
TSPlayer player = (TSPlayer)ret;
|
||||
var reason = null == args.Parameters["reason"] ? "Banned via web" : args.Parameters["reason"];
|
||||
TShock.Bans.AddBan2(player.IP, player.Name, "", "", reason);
|
||||
TShock.Utils.ForceKick(player, reason, false, true);
|
||||
player.Kick(reason, true, false, null, true);
|
||||
return RestResponse("Player " + player.Name + " was banned");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue