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

+2 -1
View File
@@ -464,7 +464,7 @@ const sendUserVars = session => {
};
const findOnline = username => online.get(String(username).toLowerCase());
const STAFF_WINDOW_COMMANDS = ["warn", "message", "silence", "kick", "summon", "goto", "warnings"];
const STAFF_WINDOW_COMMANDS = ["warn", "unwarn", "message", "silence", "kick", "summon", "goto", "warnings"];
const MAX_STAFF_WINDOW_WORDS = 3; // username, then a reason, hours or the message (each one field)
// a custom colour (lib/colours.js) for these four RGB values, made if it is
@@ -603,6 +603,7 @@ const handlers = {
}
buddies.greet(session);
minigames.greet(session);
moderation.greet(session);
// never asked what chat they want filtered: the window is put to
// them, this once (the patched client's "xfa").
if (!session.account.filter.chosen) {