Server either console can now kick and ban players regardless of the players immune permissions which fixes #391

Refactored Utils ForceKick to call Kick so we have one core method with all the logic in
Added missing params to docs for Kick and Ban
This commit is contained in:
stevenh 2012-02-21 01:07:41 +00:00
parent aeab6d9e45
commit 988bc4198b
2 changed files with 23 additions and 26 deletions

View file

@ -786,7 +786,7 @@ namespace TShockAPI
string reason = args.Parameters.Count > 1
? String.Join(" ", args.Parameters.GetRange(1, args.Parameters.Count - 1))
: "Misbehaviour.";
if (!TShock.Utils.Kick(players[0], reason))
if (!TShock.Utils.Kick(players[0], reason, !args.Player.RealPlayer, false, args.Player.Name))
{
args.Player.SendMessage("You can't kick another admin!", Color.Red);
}
@ -833,7 +833,7 @@ namespace TShockAPI
string reason = args.Parameters.Count > 1
? String.Join(" ", args.Parameters.GetRange(1, args.Parameters.Count - 1))
: "Misbehaviour.";
if (!TShock.Utils.Ban(players[0], reason))
if (!TShock.Utils.Ban(players[0], reason, !args.Player.RealPlayer, args.Player.Name))
{
args.Player.SendMessage("You can't ban another admin!", Color.Red);
}