> For the complete documentation index, see [llms.txt](https://axiomemu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiomemu.gitbook.io/docs/data/experiencetable/filter.md).

# Filter.txt / FilterRename.txt

Two text files with different behaviors:

* **Filter.txt** censors chat messages. Matched substrings are replaced in place with asterisks before the message is relayed to other players. The message is never blocked.
* **FilterRename.txt** blocks renames. If a requested new name contains any listed substring, the rename is rejected outright.

## File Location

```
Data/Util/Filter.txt
Data/Util/FilterRename.txt
```

Both loaded once at GameServer startup. Changes require a restart.

## Format

```
//Label
word1
word2
end
```

Terminated by `end`. Comment lines start with `//`. One forbidden substring per line. Entries containing spaces or brackets must be quoted, for example `"[gm]"`.

## Semantics

* **Substring match, case-sensitive.** `admin` matches `admin` and `superadmin` but not `Admin` or `ADMIN`. List variants explicitly if you need case coverage.
* **Filter.txt** is applied to the message body of: public chat, whisper, cross-server global whisper, and `/post`. Party (`~`), guild (`@`), and Gens (`$`) messages are routed through the same public-chat handler, so they are also censored. Slash commands other than `/post` are not censored.
* **Filter.txt** censors by overwriting the matched substring with `*` characters of equal length; the rest of the message is delivered unchanged.
* **FilterRename.txt** is checked by the rename command handler. A match cancels the rename and notifies the player.

## Capacity And Entry Length

| File               | Max entries | Max entry length |
| ------------------ | ----------- | ---------------- |
| `Filter.txt`       | 500         | 15 characters    |
| `FilterRename.txt` | 100         | 10 characters    |

Entries longer than the per-file cap are truncated when stored, so the runtime only ever matches the first N characters of a label.

{% hint style="warning" %}
Because matching is case-sensitive and has no leet-speak or diacritic normalization, a single word often needs several entries (`admin`, `Admin`, `ADMIN`, `adm1n`, etc.) to be reliably caught.
{% endhint %}

Differences from [BadSyntax.txt](/docs/dataserver/badsyntax.md) (DataServer-side):

* BadSyntax runs at character and guild creation. Filter.txt runs on chat at runtime. FilterRename.txt runs on rename at runtime.
* All three use substring matching. Filter.txt and FilterRename.txt are case-sensitive.
* Filter.txt censors (message still sent). FilterRename.txt and BadSyntax.txt reject the action.

## Cross-File Dependencies

| Filter                  | Also check                                                                                |
| ----------------------- | ----------------------------------------------------------------------------------------- |
| Character name creation | [DataServer BadSyntax.txt](/docs/dataserver/badsyntax.md)                                 |
| Chat command gates      | [Command.dat](/docs/gameserver/command-dat.md) / [Command.xml](/docs/data/command-xml.md) |
| Rename command          | [Command.dat](/docs/gameserver/command-dat.md) rename settings                            |

## Common Issues

* **Short word over-censors** - `ad` turns `shadow` into `sh**ow` and `paladin` into `pal**in`. Use longer explicit strings
* **Casing bypass** - `admin` blocked but `Admin` allowed. The filter is case-sensitive; list every case variant you care about
* **Leet-speak bypass** - `admin` blocked but `adm1n` allowed. There is no normalization
* **Filter silently unset** - missing `end` terminator; the parser drops the whole file
* **Rename text looks censored instead of blocked** - rename goes through FilterRename.txt only; Filter.txt does not apply to rename input
