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:
Lucas Nicodemus 2012-05-26 09:50:15 -06:00
parent ca5d68b838
commit 8ecabb7f2e
4 changed files with 9 additions and 9 deletions

View file

@ -2271,7 +2271,7 @@ namespace TShockAPI
}
else
{
TShock.Utils.ForceKick(args.Player, TShock.Config.MediumcoreKickReason);
TShock.Utils.ForceKick(args.Player, TShock.Config.MediumcoreKickReason, true, false);
}
return true;
}

View file

@ -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");
}

View file

@ -672,7 +672,7 @@ namespace TShockAPI
if (Utils.ActivePlayers() + 1 > Config.MaxSlots + 20)
{
Utils.ForceKick(player, Config.ServerFullNoReservedReason);
Utils.ForceKick(player, Config.ServerFullNoReservedReason, true, false);
handler.Handled = true;
return;
}
@ -684,14 +684,14 @@ namespace TShockAPI
if (ban != null)
{
Utils.ForceKick(player, string.Format("You are banned: {0}", ban.Reason));
Utils.ForceKick(player, string.Format("You are banned: {0}", ban.Reason), true, false);
handler.Handled = true;
return;
}
if (!FileTools.OnWhitelist(player.IP))
{
Utils.ForceKick(player, Config.WhitelistKickReason);
Utils.ForceKick(player, Config.WhitelistKickReason, true, false);
handler.Handled = true;
return;
}
@ -704,7 +704,7 @@ namespace TShockAPI
{
if (Config.KickProxyUsers)
{
Utils.ForceKick(player, "Proxies are not allowed");
Utils.ForceKick(player, "Proxies are not allowed.", true, false);
handler.Handled = true;
return;
}
@ -737,7 +737,7 @@ namespace TShockAPI
if (ban != null)
{
Utils.ForceKick(player, string.Format("You are banned: {0}", ban.Reason));
Utils.ForceKick(player, string.Format("You are banned: {0}", ban.Reason), true, false);
handler.Handled = true;
return;
}

View file

@ -516,7 +516,7 @@ namespace TShockAPI
{
if (player != null && player.Active)
{
ForceKick(player, reason);
ForceKick(player, reason, false, true);
}
}
}