Remove the ability to ban oneself

This commit is contained in:
Lucas Nicodemus 2015-04-08 23:46:00 -06:00
parent 371beb8c52
commit cef253ce20

View file

@ -1211,6 +1211,13 @@ namespace TShockAPI
if (user != null)
{
bool force = !args.Player.RealPlayer;
if (user.Name == args.Player.Name && !force)
{
args.Player.SendErrorMessage("You can't ban yourself!");
return;
}
if (TShock.Groups.GetGroupByName(user.Group).HasPermission(Permissions.immunetoban) && !force)
args.Player.SendErrorMessage("You can't ban {0}!", user.Name);
else