Hide Playerbot accounts from search, character pages and guild rosters #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hide-bot-accounts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Playerbots are ordinary accounts, not game masters, so upstream's
hideGameMastersnever touched them. On a realm running mod-playerbots the armory is effectively a bot directory.The filter
Two new options, applied exactly the way the existing GM filter works — left join the accounts we don't want, then require the join to have missed:
hideBotAccountstruebotAccountPatternRNDBOT%Applied in three places: the search listing, guild rosters, and the character lookup — so a bot's page 404s rather than rendering. A realm with no bots matches nothing, so the default is harmless upstream.
ARMORY_HIDE_BOTSandARMORY_BOT_PATTERNare wired throughdocker-compose.mythica.yml, both defaulted on, so no stack changes are needed — just pull and redeploy.Verified against the live realm
Typecheck and eslint both clean.
One note on the SQL
The pattern is spliced into join clauses the query builder emits as raw SQL, so it can't be a bound parameter without disturbing the positional values around it. It comes from the operator's config rather than from a request, but
Utils.quoteSqlStringquotes it anyway so a stray apostrophe can't produce a broken or surprising query.This is upstreamable as-is if you ever want to send it back — it's a general Playerbots problem, not a Mythica-specific one.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NW2ooBP2KPqQVzdZZDMvZd