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]>
This commit is contained in:
SnipzilandClaude Opus 5.5 committed 2026-10-16 22:43:27 -04:00
1 parent 6563d5de99
commit 627e6f9180
5 files changed
+262 -4

No files matched your search

+5
View File
@@ -84,6 +84,11 @@ package
PaletteHelper.handleCustomColors(param1.obj);
return;
}
if(param1.obj[0] == "xsp")
{
AJClient.onStaff(param1.obj);
return;
}
if(param1.obj[0] == "xdi")
{
AJClient.onItemDefs(param1.obj);