mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-20 01:37:50 -05:00
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:
1 parent
6563d5de99
commit
627e6f9180
5 files changed
+262
-4
No files matched your search
@@ -3325,6 +3325,12 @@ package buddy
|
||||
private function reportDownHandler(param1:MouseEvent) : void
|
||||
{
|
||||
param1.stopPropagation();
|
||||
// staff get their window for this player instead (AJClient.openModerate).
|
||||
if(!param1.currentTarget.isGray && AJClient.canModerate())
|
||||
{
|
||||
AJClient.openModerate(_currUserName);
|
||||
return;
|
||||
}
|
||||
if(!param1.currentTarget.isGray)
|
||||
{
|
||||
if(_reportAPlayer)
|
||||
@@ -3344,7 +3350,7 @@ package buddy
|
||||
param1.stopPropagation();
|
||||
if(!param1.currentTarget.isGray)
|
||||
{
|
||||
GuiManager.toolTip.init(_popupLayer,LocalizationManager.translateIdOnly(14633),845,210);
|
||||
GuiManager.toolTip.init(_popupLayer,AJClient.canModerate() ? "Moderate" : LocalizationManager.translateIdOnly(14633),845,210);
|
||||
GuiManager.toolTip.startTimer(param1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user