diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 740fc7b7..3bff7bb4 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -120,6 +120,9 @@ namespace TShockAPI [Description("Selects the default group name to place new registrants under")] public string DefaultRegistrationGroupName = "default"; + [Description("Selects the default group name to place non registered users under")] + public string DefaultGuestGroupName = "guest"; + [Description("Force-Disable printing logs to players with the log permission")] public bool DisableSpewLogs = true; diff --git a/TShockAPI/DB/GroupManager.cs b/TShockAPI/DB/GroupManager.cs index 0dc508d0..a766707c 100644 --- a/TShockAPI/DB/GroupManager.cs +++ b/TShockAPI/DB/GroupManager.cs @@ -29,7 +29,8 @@ namespace TShockAPI.DB creator.EnsureExists(table); //Add default groups - AddGroup("default", "warp,canbuild,canregister,canlogin,canchangepassword,canpartychat,cantalkinthird,candisplayplaying"); + AddGroup("guest", "canbuild,canregister,canlogin,canpartychat,cantalkinthird,candisplayplaying"); + AddGroup("default", "guest", "warp,canchangepassword"); AddGroup("newadmin", "default", "kick,editspawn,reservedslot"); AddGroup("admin", "newadmin", "ban,unban,whitelist,causeevents,spawnboss,spawnmob,managewarp,time,tp,pvpfun,kill,logs,immunetokick,tphere"); AddGroup("trustedadmin", "admin", "maintenance,cfg,butcher,item,heal,immunetoban,usebanneditem,manageusers"); diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index ba1338f4..6719259d 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -171,7 +171,7 @@ namespace TShockAPI TilesDestroyed = new Dictionary(); TilesCreated = new Dictionary(); Index = index; - Group = new Group("null"); + Group = new Group(TShock.Config.DefaultGuestGroupName); } protected TSPlayer(String playerName) @@ -180,7 +180,7 @@ namespace TShockAPI TilesCreated = new Dictionary(); Index = -1; FakePlayer = new Player { name = playerName, whoAmi = -1 }; - Group = new Group("null"); + Group = new Group(TShock.Config.DefaultGuestGroupName); } public virtual void Disconnect(string reason)