All TShock methods calling the obsolete ForceKick function now use the new one
Subnote: fixes an issue where players would be reported as kicked to the ingame console.
This commit is contained in:
parent
ca5d68b838
commit
8ecabb7f2e
4 changed files with 9 additions and 9 deletions
|
|
@ -522,7 +522,7 @@ namespace TShockAPI
|
|||
return ret;
|
||||
|
||||
TSPlayer player = (TSPlayer)ret;
|
||||
TShock.Utils.ForceKick(player, null == parameters["reason"] ? "Kicked via web" : parameters["reason"]);
|
||||
TShock.Utils.ForceKick(player, null == parameters["reason"] ? "Kicked via web" : parameters["reason"], false, true);
|
||||
return RestResponse("Player " + player.Name + " was kicked");
|
||||
}
|
||||
|
||||
|
|
@ -535,7 +535,7 @@ namespace TShockAPI
|
|||
TSPlayer player = (TSPlayer)ret;
|
||||
var reason = null == parameters["reason"] ? "Banned via web" : parameters["reason"];
|
||||
TShock.Bans.AddBan(player.IP, player.Name, reason);
|
||||
TShock.Utils.ForceKick(player, 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