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]>
This commit is contained in:
SnipzilandClaude Opus 5.5 committed 2026-10-16 22:43:28 -04:00
1 parent 627e6f9180
commit f3983fcf67
8 files changed
+145 -19

No files matched your search

+4
View File
@@ -285,6 +285,10 @@ module.exports = {
idleTimeoutMs: 15 * 60000, // the client sends a keep-alive far more often
tokenLifetimeDays: 30, // login tokens kept by the launcher's "remember me"
maxChatLength: 300,
// warnings (lib/moderation.js warn): the Nth one within `days` also
// silences the player for that many minutes, [[N, minutes], ...]. a
// longer silence already on them stays. steps [] turns it off.
warningSilence: {days: 30, steps: [[3, 60], [5, 24 * 60]]},
// days typed chat and whispers are kept for the moderator panel's chat
// history (lib/chatlog.js); 0 keeps none.
chatLogDays: env.AJ_CHAT_LOG_DAYS === undefined ? 30 : Math.max(0, Number(env.AJ_CHAT_LOG_DAYS) || 0),