> For the complete documentation index, see [llms.txt](https://wiki.staffplusplus.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.staffplusplus.org/features/warnings/actions-punishments.md).

# Actions (punishments)

We can define actions inside the warnings-module. Actions will be executed whenever a warning is issued. Every action must follow the [Staff++ command format](/general-information/other/configuring-commands.md)

Besides the general command, a **rollback-command** can be specified. A rollback command follows the [Staff++ command format](/general-information/other/configuring-commands.md). The rollback command gets executed whenever a warning is deleted or has been successfully [appealed](/features/warnings/appealing.md).

### Placeholders:

| placeholder | description                                           |
| ----------- | ----------------------------------------------------- |
| %target%    | The name of the player that was warned                |
| %issuer%    | The name of the staff member that created the warning |
| %severity%  | The severity of the warning                           |
| %score%     | The score of the warning                              |
| %reason%    | The reason of the warning                             |

### Executors:

| executor value | description                              |
| -------------- | ---------------------------------------- |
| target         | The player that has been warned          |
| issuer         | The staff member that issued the warning |

### Targets:

| target value | description                              |
| ------------ | ---------------------------------------- |
| target       | The player that has been warned          |
| issuer       | The staff member that issued the warning |

### Filters

| filter     | possible values                      | description                                                                                                                         |
| ---------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| type       | comma separated list of the any type | Can specify if a command should be executed only when the report is of a certain [type](/features/reporting/custom-report-types.md) |
| hasculprit | \[true/false]                        | Can specify if a command should be executed only when it's a report that is targeting a player                                      |

**Example configuration:**

```yaml
warnings-module:
  actions:
    - command: 'eco take %target% 2000'
      filters: 'severity=MINOR,MAJOR'
      rollback-command: 
        command: 'eco give %target% 2000'
    - command: 'eco take %target% 5000'
      filters: 'severity=CRITICAL'
      rollback-command: 
        command: 'eco give %target% 5000'
    - command: 'freeze enabled %target%'
      filters: 'severity=CRITICAL'
      rollback-command: 
        command: 'freeze disabled %target%'
```

In the above example configuration the following will happen:

If a MINOR or MAJOR warning is issued. \
&#x20;        \- The target will be deducted $2000 from his balance.\
If a CRITICAL warning is issued. \
&#x20;        \- The target will be deducted $5000 from his balance.\
&#x20;        \- The target will get frozen if he is online, or the next time he comes online.\
\
If the warning gets rollbacked the target will get automatically reimbursed.&#x20;

{% hint style="warning" %}
It's important to not that actions get linked to the warning the moment the warning is created.\
Changing the action configuration will not impact existing warnings.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.staffplusplus.org/features/warnings/actions-punishments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
