-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring Users
Shine’s user system can be configured to either take users from a local file or from a remote URL. See the base config page for information on how to set up web users. Specifically, the settings “GetUsersFromWeb” and “UsersURL” control if and where to get web users.
If you have a user config file from DAK or the default NS2 users format, Shine will automatically convert it on first run. There’s no need to remake the file if you are switching to Shine. Obviously you’ll have to adjust the command names to match the ones in Shine.
If you are loading from the web, Shine will also recognise the NS2/DAK ServerAdmin.json file format and read it properly. It cannot read the format DAK uses to load from the web, only JSON data. It’s advised to change it to the Shine format or at least change the command names to match Shine’s, the converter will just replace sv_ with sh_.
The default Shine user config file will look something like this:
{ "Groups": { "SuperAdmin": { "IsBlacklist": true, "Immunity": 100, "Commands": [ ] }, "Admin": { "IsBlacklist": false, "Immunity": 50, "Commands": [ "sh_kick", "sh_ban" ] }, "Mod": { "IsBlacklist": false, "Immunity": 10, "Commands": [ "sh_kick" ] } }, "Users": { "90000000000001": { "Group": "Mod", "Immunity": 2 }, "123456": { "Group": "Admin", "Immunity": 2 }, } }
Note that the users listed are for the purpose of being an example only. I have no idea if anyone actually has either NS2ID, and you should obviously remove them from the list for your own config.
If you are getting this file locally, it should be called “UserConfig.json” and be under config://shine/UserConfig.json. If you are getting it remotely, the name is not important.
The groups table is indexed by group names, so if you wish to make a new group called “Member”, then you would add:
"Member": { "IsBlacklist": false, "Immunity": 5, "Commands": [ "sh_kick" ] }
to the “Groups” table. Here this group has Immunity level 5, so it’s below the default groups and can’t target them. Also, as we’ve set IsBlacklist to false, this group can only run sh_kick.
Option | Description |
---|---|
IsBlacklist | If it is a blacklist, then it is a list of commands the group cannot run. Otherwise it is a list of commands they can run. |
Commands | Adding commands here will either allow or disallow the group from using them, depending on the IsBlacklist setting. |
Immunity | Sets the groups immunity level. Higher immunity levels are immune to lower levels. |
The users table is indexed by Steam ID (the ingame Steam ID number, not STEAM_0:0:X). To get this number from the traditional STEAM_0:X:Y value, the formula is:
NS2ID = Y * 2 + X
To add a user with Steam ID “123456” to the admin group, you would add:
"123456": { "Group": "Admin" }
to the “Users” table.
Option | Description |
---|---|
Group | Sets the user’s group. |
Immunity | Overrides the groups immunity level for this user. |
Some plugins specify commands that aren’t actually commands but instead grant access or immunity to features. These should be added in the same way as normal commands to groups.
Command | Description |
---|---|
sh_seelogechos | Sets whether a group can see when others use commands (printed to their console). |