Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

Slow mode refuses a second chat line within slowModeSeconds with 'slow mode: wait Ns'; the owner and moderators are exempt - lobby and test only #381

shipped merged opened this has it
opened this

Replaces #194, which waited on #256 (done on main in 81fbc14, still open). slowModeSeconds is already an admin setting (src/admin.ts); nothing enforces it yet.

Done:

  • [ ] In Software/so101/src/lobby.ts, the post case refuses a line from a person whose last accepted line was less than admin.settings.slowModeSeconds ago, with the error slow mode: wait Ns (N rounded up) sent to that socket only. It uses the lobby's existing now clock. 0 turns it off. The owner and verified moderators are exempt. A refused line does not reset the timer.
  • [ ] Tests in src/lobby.test.ts with an injected now: a second line at 4 s with slow mode 5 is refused with 'slow mode: wait 1s', at 5 s it is accepted, a moderator and the owner are never held, and 0 holds nobody.
  • [ ] Only lobby.ts and lobby.test.ts change. forge.json untouched. bun x tsc --noEmit and bun --cwd Software/so101 test pass.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs