Remove the ability to ban oneself
This commit is contained in:
parent
371beb8c52
commit
cef253ce20
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue