From 872b239b47192b75a18e0efc43ae41c3dc197a53 Mon Sep 17 00:00:00 2001 From: James Puleo Date: Wed, 14 Dec 2022 21:41:37 -0500 Subject: [PATCH] Seed initial group database with `default` and `guest` names from config The `GroupManager` constructor ensures the structure of the `GroupList` table, and if the table is newly-created, then some initial data is seeded. We previously used the names `default` to represent the group that accounts are defaultly registered to, and `guest` to represent players that have not logged in yet. We now instead refer to the group names specified by the config (`DefaultRegistrationGroupName` and `DefaultGuestGroupName` respectively) --- TShockAPI/DB/GroupManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TShockAPI/DB/GroupManager.cs b/TShockAPI/DB/GroupManager.cs index 8e0e3192..ed90a11a 100644 --- a/TShockAPI/DB/GroupManager.cs +++ b/TShockAPI/DB/GroupManager.cs @@ -57,7 +57,7 @@ namespace TShockAPI.DB if (creator.EnsureTableStructure(table)) { // Add default groups if they don't exist - AddDefaultGroup("guest", "", + AddDefaultGroup(TShock.Config.Settings.DefaultGuestGroupName, "", string.Join(",", Permissions.canbuild, Permissions.canregister, @@ -68,7 +68,7 @@ namespace TShockAPI.DB Permissions.synclocalarea, Permissions.sendemoji)); - AddDefaultGroup("default", "guest", + AddDefaultGroup(TShock.Config.Settings.DefaultRegistrationGroupName, TShock.Config.Settings.DefaultGuestGroupName, string.Join(",", Permissions.warp, Permissions.canchangepassword, @@ -82,7 +82,7 @@ namespace TShockAPI.DB Permissions.magicconch, Permissions.demonconch)); - AddDefaultGroup("vip", "default", + AddDefaultGroup("vip", TShock.Config.Settings.DefaultRegistrationGroupName, string.Join(",", Permissions.reservedslot, Permissions.renamenpc,