config.lua
Sources toggle
false hides that source from the player’s picker. Players currently using a disabled source fall back to initials on their next connect.
New players default to
initials (hardcoded server-side). They keep using the letter tile until they actively pick a URL in the Settings panel.URL allowlist
The biggest reason this isn’t a free-form text field: a player can otherwise paste any URL into the chat and force every other player’s CEF to fetch it. That’s a vector for tracking pixels, DDOS reflection, and IP-grabbing. The allowlist caps that.Validation rules
A URL is accepted iff all are true:- Starts with
http://orhttps://. - Hostname (just the host, no path) appears verbatim in
allowedHosts(case-insensitive). - File extension appears verbatim in
allowedExtensions(case-insensitive). - Total length ≤ 512 chars.
Per-character storage
Avatars are saved keyed by the framework’s character id (e.g. QBOXcitizenid), not just the license. Two characters on the same license each have their own avatar.
- Bridge fires
qbx_core:server:onPlayerLoaded(or equivalent). - Server pushes the new character’s avatar fields to the NUI via
settingsSaved. - Settings panel + every chat row updates live.
Standalone fallback
On a standalone server (no framework, no character id), the per-character layer doesn’t apply. Avatars save as flatavatarSource + avatarUrl keys on the settings row, applying license-wide. That’s the legacy behaviour pre-multichar.
Avatar in anonymous channels
For channels withanonymous = true:
- The server strips
avatarUrlfrom the payload before broadcasting. - The chat row renders a neutral grey silhouette tile (
fa-user-secreticon) instead of the player’s real avatar. - Every recipient sees the same silhouette - the avatar tile is keyed to the channel, not the player.
Avatar in Discord webhooks
When archiving messages to Discord:- The author block’s avatar uses the player’s URL avatar (if set).
- Players using
initialsmode have no URL - the Discord embed shows a default Discord icon.
anonymousInWebhook = true, the avatar is omitted from the Discord embed too (matching the “Anonymous” label).