# Chat rules

Chat rules are used to control chat visibility, text appearance and delay between sending text messages by game state.

{% hint style="info" %}
To take full control of the chat functions please use a ChatControl plugin for that.
{% endhint %}

{% hint style="warning" %}
If you use any type of ChatControl plugin, it can take over these options since it has higher priority and RageMode won't override these.
{% endhint %}

## Statuses to modify chat

* `running` - when the game is running
* `spectator` - when players are spectating a game
* `freeze` - when the game is in freeze state
* `lobby` - when players are waiting in game lobby

## Configuration

```yml
chat-rules:
  ingame-players-see-global-chat: true

  running:
    allow-chat: true
    bypass-permission-if-disabled: ragemode.bypass.game.nochat
    format: <yellow>[%points%]<reset> %player%<light_gray>:<reset> %message%
    delay-between-messages:
      value: 0
      bypass-permission: ''

  spectator:
    allow-chat: false
    bypass-permission-if-disabled: ''
    format: ''
    delay-between-messages:
      value: 0
      bypass-permission: ''

  freeze:
    allow-chat: true
    bypass-permission-if-disabled: ''
    format: ''
    delay-between-messages:
      value: 0
      bypass-permission: ''

  lobby:
    allow-chat: true
    bypass-permission-if-disabled: ''
    format: ''
    delay-between-messages:
      value: 0
      bypass-permission: ''
```

* `ingame-players-see-global-chat`
  * If enabled all players can see both global and in-game chat by default (following vanilla behaviour)
  * When disabled, in-game players can only see in-game chat, while others not in game cannot see in-game chat
  * This also separates each game chat, so the player in a game can only see their matching game chat
* `status` - the game status listed [above](#statuses-to-modify-chat)
  * `allow-chat` - Allows chat for players, otherwise players can not send chat messages
  * `bypass-permission-if-disabled`
    * The bypass permission if `allow-chat` option is disabled, so players with permission can still send messages.
    * Leave it empty  , so no players can send messages even with permissions
  * `format`
    * The chat format to use in game
    * Leave it empty   to do not format
  * `delay-between-messages`
    * `value` - The delay between sending messages in milliseconds (1000 = 1 second), 0 to disable
    * `bypass-permission`
      * The bypass permission for players that they can repeat messages without delay
      * Leave it empty  , so players can not bypass this


---

# Agent Instructions: 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:

```
GET https://mdswork.gitbook.io/ragemode-docs/global-game-guides/chat-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
