> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/watch-admin-menu/features/punishments.md).

# Punishments

One dialog gives a **warning**, **kick**, **jail**, **ban**, **mute** or **community service**. It opens from the player wheel, from the **Moderation** sub tab of a profile, from the palette, and from the **Punish** block of a player card on the web panel.

## Using the dialog

1. Pick the kind. Kinds your role cannot give are greyed out.
2. Pick a reason preset, or write your own. A preset can also pick the duration.
3. **Jail, ban, mute:** pick a duration chip or type one: `45m`, `2h`, `7d`, `1w`, or `perm` (bans only). A bare number is minutes, or hours for a ban. Jail also asks for the cell, community service for the number of tasks and the zone.
4. **Attach the last screenshot** (optional): the last screenshot of this player taken in the last `evidenceMinutes` goes with the punishment to its Discord channel.
5. Read the preview: it is the line the staff log will carry.
6. Confirm, or press **Ctrl Enter**.

Every punishment is written to the staff log and posted to its webhook (`warns`, `kicks`, `jail`, `bans`). The web panel's player card shows it a few seconds later, wherever it was given.

{% hint style="info" %}
Evidence needs a webhook for that category in `server/discord_log.lua`. Without one the evidence line is still logged, but the picture is not stored anywhere.
{% endhint %}

## Bans

* A ban covers **every identifier and the hardware tokens** of the player, so a new Steam or Discord account alone does not get them back in.
* Ban an offline player from the **Bans** tab by identifier, or from their offline profile.
* A banned player sees the reason, when it ends and the ban id, plus the appeal link while appeals are on. See [Ban appeals](https://docs.rainmad.com/resources/watch-admin-menu/features/mutes-community-service-whitelist-and-appeals#ban-appeals).
* Unban from the **Bans** tab, the web panel or Discord.

## Jail

The player goes to the cell you pick from `cfg.jail.cells` and is pulled back if they leave its radius. The time only runs while they are online: leaving pauses the sentence and it resumes when they join again. When it ends they are taken to `cfg.jail.release`. The jail options are in the [cfg.lua walkthrough](https://docs.rainmad.com/resources/watch-admin-menu/configuration/cfg.lua-walkthrough).

## Reason presets

```lua
cfg.admin.punish = {
    categories = { 'Cheating', 'Conduct', 'Roleplay', 'Other' },
    evidenceMinutes = 15,
    warn = {
        reasons = {
            { label = 'RDM', reason = 'Random deathmatch', category = 'Roleplay' },
        },
    },
    jail = {
        reasons = {
            { label = 'RDM', reason = 'Random deathmatch', duration = 1800, category = 'Roleplay' },
        },
        durations = { 300, 900, 1800, 3600, 7200 },
    },
    ban = {
        reasons = {
            { label = 'Cheating', reason = 'Cheating: modified client', duration = 0, category = 'Cheating' },
        },
        durations = { 3600, 86400, 259200, 604800, 2592000, 0 },
    },
    mute = {
        reasons = {
            { label = 'Mic spam', reason = 'Music or noise on the microphone', duration = 3600, category = 'Conduct' },
        },
        durations = { 300, 900, 3600, 21600, 86400, 604800 },
    },
    commserv = {
        reasons = {
            { label = 'Vandalism', reason = 'Vandalism in the city', tasks = 10, category = 'Roleplay' },
        },
    },
}
```

| Field                   | Meaning                                                                                                       |
| ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| `label`                 | The chip in the dialog.                                                                                       |
| `reason`                | What the player sees. The label when left out.                                                                |
| `duration`, `durations` | Seconds. `0` is permanent, bans only.                                                                         |
| `tasks`                 | Community service only: how many tasks the preset gives.                                                      |
| `category`              | Groups the presets in the dialog, in the order of `categories`. A preset without one is listed under General. |

`kick` takes `reasons` only. The presets are also suggested by the Discord bot's punishment commands.

## Permissions

| Action                           | Default   | What it is                                                             |
| -------------------------------- | --------- | ---------------------------------------------------------------------- |
| `warn`, `kick`, `jail`, `unjail` | moderator |                                                                        |
| `ban`, `unban`                   | admin     |                                                                        |
| `punish:presets`                 | moderator | Reads the presets for the dialog.                                      |
| `punish:evidence`                | moderator | Attaches the last screenshot. Also needs the right to that punishment. |

Mute and community service are on [Moderation](https://docs.rainmad.com/resources/watch-admin-menu/features/mutes-community-service-whitelist-and-appeals#permissions).
