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
|
|
@ -823,10 +823,13 @@ namespace TShockAPI
|
|||
(usingUUID && account.UUID == args.Player.UUID && !TShock.Config.Settings.DisableUUIDLogin &&
|
||||
!String.IsNullOrWhiteSpace(args.Player.UUID)))
|
||||
{
|
||||
args.Player.PlayerData = TShock.CharacterDB.GetPlayerData(args.Player, account.ID);
|
||||
|
||||
var group = TShock.Groups.GetGroupByName(account.Group);
|
||||
|
||||
if (!TShock.Utils.AssertGroupValid(args.Player, group))
|
||||
return;
|
||||
|
||||
args.Player.PlayerData = TShock.CharacterDB.GetPlayerData(args.Player, account.ID);
|
||||
|
||||
args.Player.Group = group;
|
||||
args.Player.tempGroup = null;
|
||||
args.Player.Account = account;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue