Commit Graph
18 Commits
Author SHA1 Message Date
SnipzilandClaude Opus 5.5 ceda20ffc8 Staff roles for the 17 October panel: address search, full rooms
- searching players by address and lifting an address ban need
  address.ban (moderators and above), not only the panel itself
- entering a full room goes by the staff role

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 22:50:47 -04:00
SnipzilandClaude Opus 5.5 f3983fcf67 Warnings: shown at the next visit, taken back, and a silence for many
- a warning given while the player is away is kept and shown with the
  game's popup once they are next in a room (the latest one)
- unwarn: "Take back latest" in the moderator panel, !unwarn in game and
  from the staff window ("xmd")
- config.warningSilence: the Nth warning within some days also silences
  (3rd: an hour, 5th: a day, by default)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 22:43:28 -04:00
SnipzilandClaude Opus 5.5 627e6f9180 A staff window in the game, from the report button of a player's card
For staff, the report button of a player's card opens a window for that
player instead (AJClient.openModerate): warn with a reason, send a
message, silence for an hour or a day or lift it, bring them here, go to
them, disconnect, and their warnings. Only what the role allows is shown.

The window sends "xmd" [command, username, ...], which the server runs as
the staff command typed in chat (lib/commands.js), so the permission check
and the moderators' log are the same; the answer comes as a message box.
Only active staff, and only these commands. Staff are sent their role and
permissions at login ("xsp"); nobody else is sent anything.

test/staff.js covers xsp and xmd, and that a player's xmd does nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 22:43:27 -04:00
SnipzilandClaude Opus 5.5 6563d5de99 Custom items made while the server runs, and a Developer role
Staff with the new items.create permission (admins, and the new Developer
role) make clothing and den items from the game's own art: an existing
item under a new id (50000 on), name, price, members-only flag and choice
of its colours. No restart of the server or of anyone's game:

- lib/customitems.js keeps them (custom_items table) and puts them into
  the server's tables and the packs new games fetch (defpacks.setCustomItem)
- games already playing get the def rows in "xdi"; so does every game at
  login. The client adds them (ItemXtCommManager.addItemDefs,
  DenXtCommManager.addDenItemDefs, both now in swf-src; rebuild with
  tools/build-client.sh)
- they are sold first in the two shops of oddities and found by the item
  finder; an item can be renamed, repriced, recoloured and taken off sale,
  never deleted (players may own it)
- the moderator panel has an Items page; in game, "!item clothing|den ID
  NAME" and "!item list"
- the Developer role holds only staff.list and items.create. The panel's
  pages that show players (players, chat, reports, requests, bans,
  paintings) now need player.view, which helpers and up have

test/items.js covers it end to end, including a restart (withServer can
keep its database for that).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 22:43:27 -04:00
SnipzilandClaude Opus 5.5 2fba9f1612 Staff roles with permissions, warnings, in-game staff commands
Moderators were one flag on the account. Now an account can hold a staff
role (lib/roles.js): helper, moderator or admin, each a list of named
permissions, with a higher role holding everything below it. An account
only marked `moderator` still counts as a moderator.

Every staff action checks the permission it needs, and staff never act
on staff of their own rank or above:

- warnings: kept on the account (who, when, the reason, a note for
  staff), and shown to the player with the game's own warning popup for
  the reason ("fw": inappropriate behavior, bullying, personal
  information, scamming), which this server's strings already word as the
  Burrow Rules.
- moderator panel: each action is checked against the role; new actions
  "warn" (with a reason and note), "summon" (bring a player to the room you
  are in) and "goto"; the player's page shows their warnings; GET
  /mod/api/me returns your role and permissions, and the page hides the
  buttons yours does not allow.
- in the game: !staff, !summon, !goto, !kick, !silence (HOURS, 0, or
  off), !warn PLAYER [reason] [note], !warnings PLAYER and !message, for
  staff whose role allows each, written to the moderators' log like the
  panel's actions, marked "(in game)". To anyone else they are plain chat.
  Usernames with spaces work.
- the login reply carries the player's own staffRole and
  staffPermissions (empty for everyone else), so a client can show staff
  tools only to staff.
- admin panel: a role picker on the account, "role" on POST
  /admin/api/account, and GET /admin/api/roles listing what each allows.
  The old moderator switch still works.

Also: the moderators' message box showed "--Message From Moderator--\n\n"
with the "\n" as written (strings 11134 and 11135 keep it as two
characters); they get real line breaks.

Staff powers need 2FA turned on, as the moderator panel already did. In
the game they come with the game session, which a trusted device opens
without a code; requiring a recent code there is left for later.

test/staff.js covers all of the above end to end.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 22:42:46 -04:00
SnipzilandClaude Opus 5.5 63dc43ebb3 test: bring the test suite up to date, and let it run on Windows
The smoke, features, account and qol tests had fallen behind the server
and failed before reaching their end. Each now checks what the server
does on purpose today:

- harness: the chat filter messages the server sends unasked ("xfl"
  after every login, "xfa" on the first room) are set aside like "zs".
- smoke: a banned account's sign-in is refused with "account_banned", so
  the login-choices check uses a fresh account instead of the banned Carol.
- features: a shop's name comes from its room file, read the first time
  anyone goes in (the first visitor sees a name made from the path). A
  scout goes in first until the file is read, so the check no longer
  depends on what an earlier run left in cache/.
- account: a deleted account's name is held for NAME_HELD_DAYS, so taking
  it again right away is "username_taken".
- qol: the commands page sets what to type in italics.

And on Windows: withServer waits for the server process to exit before
removing its data directory, and retries; the database stays locked until
the process is gone, and the cleanup's EPERM hid the test's own result.

All seven test files pass (smoke, features, account, qol, buddygames,
restored, and staff in the next commit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 22:42:36 -04:00
Burrowdev edca7bf790 ci: allow the item giver's colour picker link in the client swf 2026-10-17 02:01:34 +03:00
Burrowdev 04f468af2c feat: stats graphs, playtime, ip search against ban evasion, 150-char chat
- stats graphs for the admin and moderator panels (lib/stats.js, public/stats-view.html)
- playtime, private unless shown on the card's bio tab; set on the account page
- search accounts by ip address, only against ban evasion; mods see no addresses and each search is logged
- privacy policy for the above (terms version 2026-10-17)
- the per-second save looks only at accounts in play, with a slow sweep of the rest
- items in several dens at once; chat filter hides slurs and threats by default
- sexual usernames refused; moderators may enter full rooms; guide login allowed
- 150-character chat box (client build 55)
- fixes: gifts, trades, dens, pets in dens, den recycling, special animals' colours,
  jammer walls, settings switches; the buddy list sent at login
- the item giver, the rules screen and the art studio rework
2026-10-17 02:00:57 +03:00
Snipz 8400d2f928 Merge pull request #2 from burrow-dev/ci/security-checks
ci: add security checks and commitlint on every push
2026-10-16 18:53:20 -04:00
SnipzilandClaude Opus 5.5 dc38a49749 ci: add security checks and commitlint on every push
Security workflow, on every push, pull request and weekly:
- invariants: no npm packages, no child_process/vm/eval in the server,
  no web address outside .github/allowed-hosts.json in the server or in
  the SWFs players load, no committed keys, all JavaScript parses
- secrets: TruffleHog over the pushed commits
- codeql: security-extended queries for the JavaScript and the workflows

Commit messages are checked against Conventional Commits; the commits
publish-public.sh makes are exempt. Actions are pinned to commit SHAs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 18:18:27 -04:00
S 9d50e0a6fd Brought up to date with the private repository (15f0c27) 2026-10-15 10:18:44 +03:00
S 1b1df1ae48 Brought up to date with the private repository (feea4c7) 2026-10-14 20:57:33 +03:00
S 1aa738d692 The game's files and the decompiled client are published: .gitignore no longer holds them back; data/ and cache/ at the top only 2026-10-14 20:57:15 +03:00
burrow-dev 18ddf0cb42 Add README 2026-10-14 16:13:32 +00:00
burrow-dev 61b12b1f46 Revise comments in .gitignore file
Updated comments in .gitignore for consistency.
2026-10-14 16:10:19 +00:00
burrow-dev 4d52b1f597 Update .gitignore 2026-10-14 16:09:39 +00:00
burrow-dev b310ef7637 Update .gitignore 2026-10-14 16:07:49 +00:00
S eda992fcff Brought up to date with the private repository (a06d3c5) 2026-10-14 19:03:13 +03:00