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:
parent
048aaf6f0c
commit
c759af6d49
3 changed files with 10 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue