About Staff Applications
Version 2.0.0
Staff Applications is a website players use to apply for staff roles on your Rust server. They log in with Steam, link Discord, and submit an application. Staff review it from a dashboard. On approval, a Rust plugin adds their SteamID to the Oxide group you linked to that role.
Features
- Role pages with your own questions, set in
apply/main-config.php - Steam login for players and for the admin dashboard
- Discord linking before someone can apply
- Optional check that the applicant is in your community Discord
- New applications posted in a Discord channel, with a role ping
- Direct messages for received, accepted, denied, and blacklisted
- Accepted DM can include a staff Discord invite
- Embed text edited from JSON files or from the dashboard
- Blacklist that blocks new applications from that SteamID
- Approval queues an Oxide group, and the plugin grants it on the server
- One queue can feed more than one server. Each server uses its own Server ID
- Admin list with two flags: dashboard access, and permission to manage admins
Commands
This plugin has no chat or console commands. It polls your website on a timer and calls Oxide permission.AddUserGroup.
Permissions
The plugin does not register Oxide permissions. Create the groups yourself, then name those groups in the website config. Example:
oxide.group add admin oxide.group add moderator
The group name in oxide_group must match the Oxide group exactly. A role with an empty oxide_group still approves. Nothing is queued for the server.
Requirements
| Piece | What you need |
|---|---|
| Website | PHP 8.2 or newer with cURL, on a host that can reach Discord. Use 8.2.35, 8.3.36, 8.4.27, 8.5.12, or a newer release in that line |
| Database | MySQL |
| Player login | Steam Web API key from https://steamcommunity.com/dev/apikey |
| Discord | A Discord application: bot token, client id, and client secret |
| Server | Oxide or Carbon. The same StaffAppPerms.cs file loads on both |
Carbon compatible. Drop the plugin in the Carbon plugins folder the same way you would on Oxide.
What is in the download
-
WEBSITE/applyis the site. Upload this folder so it is reachable athttps://yourdomain.com/apply -
SQLholds the table scripts -
PLUGIN/StaffAppPerms.csis the Rust plugin -
howtoinstall.htmlis the same setup, as a page you can open locally
1. Upload the site
Extract the ZIP from Codefling. Upload the apply folder to your website. Confirm PHP can write apply/content/discord and apply/assets/css if you want to edit messages and styles from the dashboard.
2. Database
Create a MySQL database and a user. In apply/main-config.php, set the connection:
'db' => [
'host' => 'localhost',
'port' => '3306',
'username' => 'your_user',
'password' => 'your_password',
'database' => 'your_database',
],
In phpMyAdmin, open that database and import these files from the SQL folder, in any order:
createApplication.sqlcreateAdmin.sqlcreateDiscordLinks.sqlcreateBlacklist.sqlcreatePermissionQueue.sql
Warning
Already running V1? Import SQL/v2_upgrade.sql once. Do not import the new create scripts on a database that already has application_submissions and admins. The upgrade adds discord_id and creates the Discord, blacklist, and permission tables.
What each table does
| Table | Purpose |
|---|---|
application_submissions |
One row per application: role, Steam name, SteamID, Discord ID, answers, status, and time |
admins |
SteamIDs allowed into the dashboard |
discord_links |
SteamID linked to a Discord user ID and Discord name |
blacklist |
SteamIDs that cannot apply again, plus the reason and who blacklisted them |
permission_queue |
Approved SteamID and Oxide group, waiting for a server to grant it |
permission_acks |
Which Server ID has already granted that queue row |
application_submissions.status is the text the dashboard sets: Pending, Approved, Denied, or Blacklisted.
admins.staff must be 1 or the Steam login is refused at apply/admin. admins.permission_addremove must be 1 before that person can add or remove admins, remove a blacklist entry, edit Discord messages, or edit site styles.
First admin
The dashboard cannot create the first admin, because only an existing admin can open it. After the tables exist, run this in phpMyAdmin and replace the SteamID with your SteamID64:
INSERT INTO admins (steamid, staff, permission_addremove)
VALUES ('76561198000000000', 1, 1);
Log in at https://yourdomain.com/apply/admin. From Admins you can add more SteamIDs. Keep at least one admin who can manage staff.
3. Steam login
Use the same API key in both files. Set domainname to your real site, with https://.
apply/auth/SteamConfig.php is the player login:
apikey: your Steam API key domainname: https://yourdomain.com logoutpage: https://yourdomain.com/apply/index.php loginpage: https://yourdomain.com/apply/index.php
apply/admin/auth/SteamConfig.php is the staff login:
apikey: your Steam API key domainname: https://yourdomain.com logoutpage: https://yourdomain.com/apply/admin/index.php loginpage: https://yourdomain.com/apply/admin/index.php
4. Roles
Each entry under roles in apply/main-config.php is a button on the home page and a form. oxide_group is the Oxide group granted on approval. questions are the form fields.
'Admin' => [
'oxide_group' => 'admin',
'questions' => [
'How many hours do you have on this server?',
'Why do you want this role?',
],
],
A plain list of questions still works. That role approves with no Oxide group:
'Helper' => [
'What timezone are you in?',
'How often can you be online?',
],
site_info sets the site name and logo. navs are the top links. faqs are the questions on the home page. api.key is the shared secret the Rust plugin sends. Change it from the sample value and use the same value in the plugin config.
5. Discord
Create an application in the Discord developer portal.
- Under Bot, reset the token and copy it into
bot_token. - Under OAuth2, copy the client id and client secret.
- Add this redirect:
https://yourdomain.com/apply/auth/discord.php - Invite the bot to the server where applications should be posted. It needs Send Messages, Embed Links, and Read Message History in that channel.
- Applicants must be in that server. Discord only lets the bot DM people who share a server with it.
Fill discord in apply/main-config.php:
| Key | What to put |
|---|---|
enabled |
true to send posts and DMs |
bot_token |
Bot token |
client_id |
Application client id |
client_secret |
Application client secret |
redirect_uri |
https://yourdomain.com/apply/auth/discord.php |
channel_id |
Channel ID for new application embeds |
ping_role_id |
Role ID to ping. Make the role mentionable, or let the bot mention it |
guild_id |
Community server ID. Leave empty to skip the "must be in the server" check |
community_invite |
Invite shown when someone is not in that server |
staff_invite |
Optional. Included in the accepted DM. Leave empty and the DM says no staff Discord is configured |
Players log in with Steam, open Profile, and use Link Discord. The apply form stays closed until Discord is linked. If guild_id is set, they also have to be in that server.
6. Discord messages
JSON files in apply/content/discord are loaded when a message is sent. Admins who can manage staff can also edit them from the dashboard Discord section.
| File | When it is sent |
|---|---|
new_application.json |
Channel post when someone applies |
received.json |
DM to the applicant when they submit |
accepted.json |
DM when staff approve |
denied.json |
DM when staff deny |
blacklisted.json |
DM when staff blacklist that application |
Placeholders:
| Placeholder | Replaced with |
|---|---|
{steamname} |
Steam display name |
{steamid} |
SteamID64 |
{role} |
Role they applied for |
{oxide_group} |
Oxide group for that role, or Not linked
|
{answers} |
Questions and answers |
{staff_discord_line} |
Staff Discord: <link>, or No staff Discord link is configured.
|
{reason} |
Blacklist reason, or No reason given
|
{ping_role_id} |
Role ID. The new-application message uses <@&{ping_role_id}>
|
{status} |
Application status |
{submitted_at} |
Time the application was stored |
color is a decimal number, not a hex string. Keep embed field values filled in. Discord rejects an empty field.
Approving, denying, or blacklisting still saves if Discord cannot deliver the DM. The dashboard says when the DM was skipped.
7. Rust plugin
Create each Oxide group before anyone is approved into it. Copy PLUGIN/StaffAppPerms.cs to oxide/plugins. Carbon uses the same file. On first load it writes oxide/config/StaffAppPerms.json:
{
"API URL": "https://yourdomain.com/apply/api/perms.php",
"API Key": "same value as api.key",
"Server ID": "main",
"Poll interval seconds": 60.0
}
| Setting | Meaning |
|---|---|
| API URL | Your site's apply/api/perms.php
|
| API Key | Must match api.key. The plugin sends it as the X-Api-Key header |
| Server ID | A unique id for this server, letters, numbers, _, and - only, up to 64 characters. A second server needs a different id, such as eu
|
| Poll interval seconds | How often it asks for new grants. The lowest value the plugin keeps is 15 |
Reload the plugin after you edit the config.
What it does on each poll:
-
GETthe API withserver_id. The site returns queue rows this server has not confirmed, up to 50 at a time. - If the Oxide group does not exist, that row stays pending and the server console gets a warning.
- If the group exists, it runs
permission.AddUserGroupfor that SteamID. - It
POSTs the granted row ids back. The site stores them inpermission_acksfor that Server ID, so this server does not grant the same row again.
Another server with a different Server ID still receives those same grants until it confirms them.
Note
Blacklist stops new applications. It does not remove an Oxide group. Remove the group on the server yourself if that player should lose it.
A grant is queued only when the application is approved, the role has a valid oxide_group, and the SteamID is a 17-digit SteamID64. Approving the same application again does not insert a second queue row.
Player path
- Open
https://yourdomain.com/applyand log in with Steam. - Link Discord on the profile page.
- Pick a role, answer the questions, and submit.
- Staff get a channel embed. The applicant gets a received DM.
- Staff approve, deny, or blacklist from
https://yourdomain.com/apply/admin. - The applicant gets the matching DM.
- On approval, the plugin adds them to the Oxide group on the next poll.
Support
Questions about this file: Discord drxp.
