Implemented guest group config and default group.
This commit is contained in:
parent
be20d07707
commit
b7d84d6855
3 changed files with 7 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ namespace TShockAPI
|
|||
TilesDestroyed = new Dictionary<Vector2, TileData>();
|
||||
TilesCreated = new Dictionary<Vector2, TileData>();
|
||||
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<Vector2, TileData>();
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue