Role sync
The RoleSync module: a site role gives a group on the game servers, and a server group or a Discord role gives a site role.
With this module a role on the site turns into a group on the game servers by itself. Give a player the "VIP" role and the site gives them the vip group on the servers through GameLink; take the role away and the group goes too. It also works the other way: a group on a server or a Discord role gives a site role.
In the admin panel the module has its own "Role sync" row with the rules, and a "Role sync" tab on the server page. The player card gets the actions "Check roles" and "Count groups as removed", and the player's history records the groups given and taken. In their account settings the player sees "Roles and groups from game servers".

| Dependencies | Games | Permissions | Studio blocks | Bot commands | Cron tasks |
|---|---|---|---|---|---|
| Flute 2.0; optionally Rewards | servers whose GameLink plugin gives groups (group.add); Discord for rules by Discord role | admin.rolesync (includes admin.rolesync.view), admin.rolesync.view | none | none | "Role sync: scheduled check", every 10 minutes; "Role sync: roles taken back by observation", every 5 minutes |
Install and first setup
Install the module from the marketplace as described in first steps; every install option is in Installing modules. The rules live in AdminRole sync. With admin.rolesync.view alone the screen shows without buttons. admin.rolesync is marked as a sensitive permission: it hands out groups on the servers.
The servers must be connected through GameLink, and their plugin must be able to give groups. A rule skips a server that cannot, and the "Links" column lists it under "skipped".
The VIP role on the site gives the vip group on the servers
Create a rule
Click "New rule". In "Direction" pick "Role → group", in "Site role" pick VIP, and type vip in "Server group". The list holds the names the servers report, and a name of your own is allowed. Leave "Servers" empty so the rule acts on every server that can take groups.

Save the rule switched off
Click "Create switched off". You see "The rule is created switched off.". If no server reported such a group, the message adds "No server reported such a group, check the name.".
Look at the trial run
In the rule's row, click "Trial run". The window shows how many players "Will gain" and "Will lose" the group and how many are "Of them waiting for a game account". Nothing changes.

Switch it on and run it
Click "Switch on", then "Run now" to check everyone at once. Otherwise the scheduled check walks the accounts in a circle, 200 per run. An account whose role was just given or taken is checked right away through the queue.
The "Links" column shows where things stand: "in force", "on the way" (the command waits for the plugin), "waiting for an account" (the player has no game account the server knows), "not given". A group waiting for an account goes out by itself once the player links one. Click "not given" to open the server deliveries with the reason and retry.
On the server page, the "Role sync" tab shows the rules that act on that server and their "Links on this server". Open the server in AdminServers and the "Role sync" tab.

When the role is taken away
Taking away the VIP role queues a check of that account, and the site sends the removal of the vip group to every server of the rule. If a server refuses, the link gets "not given", and later checks try the removal again. The module also takes back everything it gave from a blocked, unconfirmed or deleted account.
A switched-off rule takes back everything it gave: "The rule is off: what it gave is being taken back.". Deleting does the same and removes the row once everything is taken back. If a server never takes the group off, a rule being deleted goes after about a day anyway. For one player, the card has "Count groups as removed": the retries stop, and you check the group on the server yourself.
Once a rule has given its first link, only its servers and source can change: "The rule has given roles or groups already: only its servers and source can change.". To change the role or the group, delete the rule and create a new one.
A server group or a Discord role gives a site role
The "Group → role" direction gives a site role for a group. Saving such a rule asks you to confirm your login again. "Where the group is read from" has three sources:
| Source | Where the group comes from | When the role goes |
|---|---|---|
| "By site grants" | the "Server group by name" rewards in force from the Rewards module, for example bought in the store; no plugin needed | the reward ends or is revoked |
| "By what the server reports" | the groups the plugin reports for players online, like the Minecraft plugin with LuckPerms groups | the player is online without the group for longer than 15 minutes |
| "By a Discord role" | the member's role on the site's Discord server, if their Discord is linked to the account | at the next check after the Discord role is lost, within 10 minutes |
A role with administrator rights cannot be given by what a server reports or by a Discord role. Rules by Discord role need the bot, otherwise the screen says "Discord is not connected".
If the player already held the role, given by hand or by another module, the rule leaves it alone and never takes it back. The player gets the notice "Given by role sync" or "Taken back by role sync" while "Tell players about site roles given and taken" is on.
Settings
Checks and notices: AdminRole syncSettings. The tab opens with admin.rolesync together with the site settings permission admin.system.

| Field | What it changes | Default |
|---|---|---|
| "Accounts per scheduled check" | how many accounts the check every 10 minutes goes through, 10 to 5000 | 200 |
| "Wait before a role given by observation goes, minutes" | how long the group may be missing, 1 to 1440 | 15 |
| "Tell players about site roles given and taken" | a notice for "group → role" rules | on |
| "Tell players about server groups given and taken" | a notice for "role → group" rules | off |
Games
The GameLink plugin gives and takes the group with the group.add and group.remove actions. Write the group name the way the plugin understands it: on CS2 the group vip:gold goes to the VIP plugin, in Garry's Mod the group goes to ULX or FAdmin, in Rust to Oxide or Carbon groups, in Minecraft to LuckPerms. On Source a vip:… group goes to VIP Core and the rest become SourceMod admin groups. On CS 1.6 the vip:<name> and admin:<name> groups go through the plugin's command templates, and on FiveM a group becomes the ACE principal group.<name>. On SA-MP groups are given by the game mode, if it reports group.add.
Plugins refuse admin groups until their config allows them. Such a link gets "not given" with the reason in the deliveries.
For developers
Every link given or taken back goes to the journal and out as the webhooks rolesync.link.applied "Role sync: a role or group given" and rolesync.link.removed "Role sync: a role or group taken back", with ruleId, userId and serverId.
The REST resource rolesync-rules returns the rules read only, with the filters direction, roleId, enabled and source. The key needs access to this resource in API access. Rules are written only on the module's screen.
How the core side works: API keys and the REST API, Module REST API.
Troubleshooting
For any other message, use the error lookup.
The server did not take the group
"Links" shows "not given", and the admin home shows "Servers refused groups". Click "not given": the deliveries show the reason. Usually the group does not exist on the server, or the plugin refuses admin groups. Fix it and retry the delivery.
| Message | What to do |
|---|---|
| "This role is above yours: only someone allowed to give it may create or change a rule with it." | someone with a higher role creates the rule |
| "A group name is 1–64 characters: Latin letters, digits and _ . : @ -." | fix "Server group" |
| "The role has administrator rights: it may not be given by what a server reports: a forged server would appoint admins. Choose the source "site grants"." | pick "By site grants" |
| "A reverse rule with the same role and group exists, they would feed each other forever." | delete one of the two rules |
| "The rule has given roles or groups already: its direction, role and group cannot change. Delete it and create a new one." | delete the rule and create a new one |
| "Such a rule exists already." | nothing to fix, the rule already works |