Missing group safeguards.
- Server will no longer start up when the guest or default groups cannot be located. - Players joining with unknown groups assigned to them will be disconnected with an error
This commit is contained in:
parent
c5421460ae
commit
48370d74b7
6 changed files with 41 additions and 5 deletions
|
|
@ -212,6 +212,17 @@ namespace TShockAPI
|
|||
} while (TilePlacementValid(tileX, tileY) && TileSolid(tileX, tileY));
|
||||
}
|
||||
|
||||
public bool AssertGroupValid(TSPlayer player, Group group)
|
||||
{
|
||||
if (group == null)
|
||||
{
|
||||
player.Disconnect("Your account's group could not be found. Please contact server administrators about this.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if a tile is valid.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue