# Moderation workflows

Punishments and appeals, reports, Helpop, freezes and chat control.

## Punishments

`/punish <player>` opens the punishment menu. What happens next depends on `native.enabled` in `modules/punish.yml`.

### Native mode (default)

GlacierStaff issues and stores its own bans, mutes, warnings and kicks, with a full case history. Each reason has an escalation ladder, and the next step is picked from the player's history within `lookback`:

```yaml
native:
  enabled: true
  network: true
  appeal-url: ""
  muted-commands: [msg, tell, w, whisper, r, reply, me, say, teammsg, tm]
  reasons:
    spam:
      label: "Spam"
      lookback: 30d
      steps: [WARN, "MUTE 30m", "MUTE 12h", "MUTE 3d"]
    cheating:
      label: "Cheating"
      lookback: 180d
      steps: ["BAN 7d", "BAN 30d", "BAN permanent glacierstaff.staff.punish.native.issue.ban.permanent"]
```

Each step needs a permission to issue. By default that's `glacierstaff.staff.punish.native.issue.<type>` (`warn`, `mute`, `kick`, `ban`), and a step can name its own after the duration, as the permanent ban does above. When the next step is above the issuer's permissions, it becomes a request in `/punish queue` for someone senior to approve or reject.

```text
/punish Steve
/punish view Steve
/punish history Steve
/punish issue Steve spam
/punish queue
/punish approve Steve <case-id>
/punish revoke Steve <case-id> Wrong player
```

`muted-commands` lists commands a muted player can't use, so a mute also covers whispers. `network: true` sends case changes to other servers over Redis. Every participating server must use the same MySQL or MongoDB database and the same reason settings.

### Appeals

Every sanction message shows the player an appeal code. If `native.appeal-url` is set, the message points them there; otherwise it tells them to contact staff with the code.

- A muted or warned player can submit it in-game with `/appeal <code> <message>`, which needs no permission.
- For a banned player who can't join, staff enter the appeal on their behalf: `/punish record-appeal <player> <code> <message>`.
- Review appeals from the player's case history, then revoke the case or `dismiss-appeal` it.

### Using another punishment plugin

Set `native.enabled: false`. The menu becomes a configurable set of buttons, each running your own plugin's command. The `gui.items` list in `punish.yml` holds the buttons. If any item has a `slot`, the layout is fixed; otherwise items fill the content area in order.

## Reports

Players report with `/report <player> <reason>`. Staff work the queue with `/reports`.

- Switch the queue to priority order and change a report's priority.
- Claim, resolve or dismiss reports.
- Jump from a report to its linked replay, invsee or punishment menu.
- `expire-after` (default `7d`) moves stale reports into history, where they stay available.
- `submit-cooldown` stops report spam.

With GlacierHub installed, `/report` from the hub lands in the same queue.

## Helpop and ModMail

Players reach staff with `/modmail <message>` or `/helpop`. In `/helpop view`:

- **Shift-left-click** to claim or release a request.
- **Shift-right-click** to close it with a reason.

Mail is always shown as plain text, so players can't inject formatting or click events.

## Freezing a player

```text
/freeze Steve 10m Screenshare check
/freeze list
/unfreeze Steve
/unfreeze *
```

A frozen player sees a screen they can close to type to staff privately. Reply with:

```text
/freezechat Steve Join the voice channel please
```

Only the exact commands in `command-whitelist` work while frozen:

```yaml
command-whitelist:
  - "/msg"
  - "/r"
  - "/modmail"
  - "/helpop"
  - "/glaciermodmail"
```

Set a console command to run if they log out while frozen in `commands.on-quit`, using `{player}` for their name. With Redis, freezes and freeze chat follow the player across servers.

## Chat control

```text
/cc mute
/cc unmute
/cc clear
```

Swear, link, spam, caps and advertising filters live under `filters` in `modules/chatcontrol.yml`. Each tells the player what they did instead of silently dropping the message.
