Minor update.

- AssertGroupValid now both sends the message and kicks the player
  depending on input parameter.
- /login and DataHandler code is now an identical assert check.
This commit is contained in:
quake1337 2021-07-13 21:53:54 +02:00
parent 048aaf6f0c
commit c759af6d49
3 changed files with 10 additions and 6 deletions

View file

@ -825,9 +825,9 @@ namespace TShockAPI
{
var group = TShock.Groups.GetGroupByName(account.Group);
if (group == null)
if (!TShock.Utils.AssertGroupValid(args.Player, group, false))
{
args.Player.SendErrorMessage("Login failed: The account references a group that doesn't exist.");
args.Player.SendErrorMessage("Login attempt failed - see the message above.");
return;
}