mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat: online players get grant changes at once
Adding or removing a grant sends the existing PLAYER_ACTION refresh through master to every world: REFRESH_ACCOUNT for an account's grants, REFRESH_CHARACTER for a character's. A world with that account's sessions (or the loaded character) drops the grants it kept, so the next command reads them again: no relog. The dashboard toasts whether the player was online. The dashboard's own open pages already get the new rights on their next request, and their WebSockets are checked again. Check: with a character in game, grant it /spawn on the dashboard (toast: "Applied in game at once") and use /spawn without relogging; remove the grant and /spawn is refused again at once. With the player offline the toast says it applies when they next play. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
enum class ePlayerAction : uint8_t {
|
||||
KICK_ACCOUNT, // Disconnect every session of accountId
|
||||
REFRESH_ACCOUNT, // Reload account data (GM level) for online sessions of accountId
|
||||
REFRESH_CHARACTER, // Reload character data (restrictions) for characterId if loaded
|
||||
REFRESH_ACCOUNT, // Reload account data (GM level, permission grants) for online sessions of accountId
|
||||
REFRESH_CHARACTER, // Reload character data (restrictions, permission grants) for characterId if loaded
|
||||
RESCUE_CHARACTER, // Transfer characterId to zoneId if it is loaded in a world, landing on spawn point `text` (empty: the zone's default)
|
||||
// Tell a player a moderator decided on something they asked for (approved = yes/no, text = name or reason)
|
||||
NAME_MODERATED, // characterId's requested name; text is the name
|
||||
|
||||
Reference in New Issue
Block a user