Skip to content

px p3: fenrir /notice + /reply, reboot_events at every countdown start, pack-update event notice - #48

Draft
alppp wants to merge 6 commits into
mainfrom
px/p3-notices
Draft

px p3: fenrir /notice + /reply, reboot_events at every countdown start, pack-update event notice#48
alppp wants to merge 6 commits into
mainfrom
px/p3-notices

Conversation

@alppp

@alppp alppp commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Companion to Bifrost PR valhallamcio/Bifrost#79 (PX wave P3). Not deployed. Adds staff slash commands /notice create|broadcast|list|expire|enable|translate|show (authors bifrost.notices), /reply <player> <text> (inserts bifrost.mail admin mail the proxy delivers in-game), modules/notices.js postPackUpdateEvent (an event notice per finished pack update; config notices.packUpdateEvents), and valhallamc.reboot_events written in executeRebootWarningsEnhanced at every countdown start (daily/scheduled/vote) with cancelledAt stamps from cancelServerReboot//reboot-cancel and the retry path (config scheduler.rebootScheduler.rebootEvents; TTL 48 h) — the proxy's relay renders countdowns from it and suppresses false crash relays. config/ is gitignored: the local file carries the two keys, rebootScheduler.defaultConfig + README document them. Tests 68 → 106. When both sides are live, set playerAlerts.channels.bossbar/actionbar: false so bars aren't doubled.

alppp added 6 commits August 17, 2026 12:41
create/broadcast/list/expire/enable/translate/show, staff-gated. doc building
lives in util/noticeDoc.js so it is testable without an interaction: id charset
and caps mirror the proxy's store, tips store their text under card, events need
an endsAt, and a body carrying <click:/<hover: is refused. mongo gets the write
helpers (upsert/list/get/enable/translate/search + insertMail for /reply).
resolves the username to a uuid via bifrost.players and inserts an unread
bifrost.mail doc; the proxy's change stream delivers it inline when they are
online, else it waits for their next login. unknown player writes nothing, and
<click:/<hover: is refused like /notice.
right after the discord announcement each update path posts
event.update.<tag>.<yyyymmdd> into bifrost.notices (3-day window, targeted at
that tag) telling players to restart their launcher. fire-and-forget: it
swallows its own errors and can never fail or delay an update. gated by
notices.packUpdateEvents (default true, added to the initializer template).
readme documents /notice, /reply and both doc shapes.
the proxy renders reboot countdowns itself and suppresses the crash relay while one runs; valhallamc.reboot_events is its only source, so one doc is written at the choke point every path shares (executeRebootWarningsEnhanced) — daily batch, staff /reboot job, player vote. fire-and-forget, so a mongo outage can never fail or delay a reboot. cancels stamp cancelledAt from cancelServerReboot and from /reboot-cancel per instance, the stop step stamps completedAt.
…, anchored id search)

a tip overrides ONE guide card looked up by its fixed id, so a generated tip.<slug>-<ts> is a doc nobody ever sees: /notice create type:tip now requires an id starting with tip. and warns (not refuses) when it isn't one the guide reads. /notice list shows startsAt as well as expiresAt/endsAt for every type. searchNoticeIds anchors the prefix and only falls back to contains when nothing starts with it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant