# 💬 Chat

> **Info:**
This module is configured in **modules/chat.yml** inside the PhoenixLobby folder.

## Chat

The chat module handles how messages look and how often they can be sent. Open it from **Editor > Modules > Chat**.

<figure><img src="../.gitbook/assets/chat/chat.png" alt="" width="563"><figcaption><p>Modules (Chat)</p></figcaption></figure>

The checks that block a message before it reaches the chat are [Anti Spam](#anti-spam) and [Chat Filter](#chat-filter).

## Format

With this option, you can change the format every chat message is built with. Use %display\_name% for the sender and %message% for what they typed.

<figure><img src="../.gitbook/assets/chat/format.png" alt="" width="563"><figcaption><p>Chat (Format)</p></figcaption></figure>

<figure><img src="../.gitbook/assets/image (81).png" alt="" width="563"><figcaption><p>Chat Format - In-Game</p></figcaption></figure>

## Cooldown

With this option, you can change the cooldown between messages, which acts as a slow mode.

<figure><img src="../.gitbook/assets/chat/cooldown.png" alt="" width="563"><figcaption><p>Chat (Cooldown)</p></figcaption></figure>

## Feature State

With this option, you can turn the chat handling off, which leaves messages to whatever other plugin you use.

<figure><img src="../.gitbook/assets/chat/feature-state.png" alt="" width="563"><figcaption><p>Chat (Feature State)</p></figcaption></figure>

## Anti Spam

Anti Spam blocks the messages that annoy the rest of your players. Each check can be turned off on its own in **Editor > Modules > Chat > Anti Spam**.

Players with `phoenixlobby.bypass.antispam` are not checked.

<figure><img src="../.gitbook/assets/chat/anti-spam.png" alt="" width="563"><figcaption><p>Chat (Anti Spam)</p></figcaption></figure>

### Repeated Messages

Blocks a message that is too similar to the last ones the player sent. **Repeated Messages History** is how many of their previous messages are compared, and **Similarity Percentage** is how close a message has to be before it counts as a repeat.

<figure><img src="../.gitbook/assets/anti-spam/block-repeated-messages.png" alt="" width="563"><figcaption><p>Anti Spam (Block Repeated Messages)</p></figcaption></figure>

<figure><img src="../.gitbook/assets/anti-spam/repeated-messages-history.png" alt="" width="563"><figcaption><p>Anti Spam (Repeated Messages History)</p></figcaption></figure>

<figure><img src="../.gitbook/assets/anti-spam/similarity-percentage.png" alt="" width="563"><figcaption><p>Anti Spam (Similarity Percentage)</p></figcaption></figure>

### Caps

Blocks a message with too many capital letters. **Caps Minimum Length** keeps short messages out of the check, and **Caps Percentage** is how much of the message has to be uppercase before it is blocked.

<figure><img src="../.gitbook/assets/anti-spam/block-caps.png" alt="" width="563"><figcaption><p>Anti Spam (Block Caps)</p></figcaption></figure>

<figure><img src="../.gitbook/assets/anti-spam/caps-minimum-length.png" alt="" width="563"><figcaption><p>Anti Spam (Caps Minimum Length)</p></figcaption></figure>

<figure><img src="../.gitbook/assets/anti-spam/caps-percentage.png" alt="" width="563"><figcaption><p>Anti Spam (Caps Percentage)</p></figcaption></figure>

### Character Flood

Blocks a message with the same character repeated too many times, with **Max Repeated Characters** setting the limit.

<figure><img src="../.gitbook/assets/anti-spam/block-character-flood.png" alt="" width="563"><figcaption><p>Anti Spam (Block Character Flood)</p></figcaption></figure>

<figure><img src="../.gitbook/assets/anti-spam/max-repeated-characters.png" alt="" width="563"><figcaption><p>Anti Spam (Max Repeated Characters)</p></figcaption></figure>

### Feature State

Turns every Anti Spam check off at once.

<figure><img src="../.gitbook/assets/anti-spam/feature-state.png" alt="" width="563"><figcaption><p>Anti Spam (Feature State)</p></figcaption></figure>

## Chat Filter

The chat filter blocks the messages that match one of your patterns. The two default patterns block links and ip addresses. Open it from **Editor > Modules > Chat > Chat Filter**.

Players with `phoenixlobby.bypass.chatfilter` are not checked.

<figure><img src="../.gitbook/assets/chat/chat-filter.png" alt="" width="563"><figcaption><p>Chat (Chat Filter)</p></figcaption></figure>

### Patterns

The list of patterns a message is checked against.

<figure><img src="../.gitbook/assets/chat-filter/patterns.png" alt="" width="563"><figcaption><p>Chat Filter (Patterns)</p></figcaption></figure>

### Censor Matches

Turn this on to replace the matched part with the censor character instead of blocking the whole message. **Censor Character** is what the match is replaced with.

<figure><img src="../.gitbook/assets/chat-filter/censor-matches.png" alt="" width="563"><figcaption><p>Chat Filter (Censor Matches)</p></figcaption></figure>

<figure><img src="../.gitbook/assets/chat-filter/censor-character.png" alt="" width="563"><figcaption><p>Chat Filter (Censor Character)</p></figcaption></figure>

### Case Insensitive

With this on, a pattern matches no matter how the message is capitalised.

<figure><img src="../.gitbook/assets/chat-filter/case-insensitive.png" alt="" width="563"><figcaption><p>Chat Filter (Case Insensitive)</p></figcaption></figure>

### Feature State

Turns the chat filter off without clearing the patterns.

<figure><img src="../.gitbook/assets/chat-filter/feature-state.png" alt="" width="563"><figcaption><p>Chat Filter (Feature State)</p></figcaption></figure>

> **Info:**
The patterns are regular expressions, so a plain word works as well as a full pattern.

Source: https://www.phoenixplugins.com/docs/phoenix-lobby/modules/chat