Added LastAccessed time field and KnownIPs field to the user database. This resulted in some changes everywhere, such as new logic with default groups. Apparently, somehow, the ip based stuff worked even though no ips were set to properly grab the user group. The wrong group was being assigned to new users resulting in a player with 0 permissions. This is now fixed.
This commit is contained in:
parent
d4e193b44d
commit
7c0bcceb9f
8 changed files with 67 additions and 26 deletions
|
|
@ -53,13 +53,15 @@ namespace TShockAPI.DB
|
|||
LoadPermisions();
|
||||
|
||||
// Add default groups if they don't exist
|
||||
AddDefaultGroup("guest", "", "canbuild,canregister,canlogin,canpartychat,cantalkinthird");
|
||||
AddDefaultGroup("default", "guest", "warp,canchangepassword");
|
||||
AddDefaultGroup(TShock.Config.DefaultGuestGroupName, "", "canbuild,canregister,canlogin,canpartychat,cantalkinthird");
|
||||
AddDefaultGroup("default", TShock.Config.DefaultGuestGroupName, "warp,canchangepassword");
|
||||
AddDefaultGroup("newadmin", "default", "kick,editspawn,reservedslot");
|
||||
AddDefaultGroup("admin", "newadmin",
|
||||
"ban,unban,whitelist,causeevents,spawnboss,spawnmob,managewarp,time,tp,pvpfun,kill,logs,immunetokick,tphere");
|
||||
AddDefaultGroup("trustedadmin", "admin", "maintenance,cfg,butcher,item,heal,immunetoban,usebanneditem,manageusers");
|
||||
AddDefaultGroup("vip", "default", "reservedslot");
|
||||
|
||||
Group.DefaultGroup = GetGroupByName(TShock.Config.DefaultGuestGroupName);
|
||||
}
|
||||
|
||||
private void AddDefaultGroup(string name, string parent, string permissions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue