# Command Spy

## About this module

The Command Spy module shows players real-time commands to admins. Commands can optionally be whitelisted or blacklisted. Does not require "process-commands" in the main config to be enabled to function.

{% hint style="info" %}
To receive notifications, op or the permission: "**chatsentry.commandspy**" is required.

Players with op or the permissions: "**chatsentry.commandspy**" & "**chatsentry.commandspy.toggle**" can toggle their commandspy notifications off and on.

To make a player or group exempt from having their commands sent to players with command spy permission, add "**chatsentry.commandspy.exempt**" to their permissions.
{% endhint %}

## Config guide

You can access the below settings in the **command-spy.yml** file within the **modules** folder of the plugin's root folder.

{% hint style="success" %}
**Config excerpts taken from v3.6.0 and may not be completely up-to-date with the latest changes. To see the most up-to-date file, see below:**
{% endhint %}

{% content-ref url="../../files/files/module-configurations/command-spy.yml" %}
[command-spy.yml](https://wiki.chatsentry.xyz/files/files/module-configurations/command-spy.yml)
{% endcontent-ref %}

###

### use-command-whitelist

If false, all commands will be "spied" on except for ones starting with the blacklisted ones. If true, only commands that start with any of the whitelisted ones will be "spied" on.

If use-command-whitelist is enabled, only commands that start with any of the words on the below list will be sent to players with commandspy permission.

```yaml
use-command-whitelist: false
```

### commandspy-command-blacklist

Commands that start with any of the words on this list won't be sent to players with commandspy permission.

*Set to "commandspy-command-blacklist: \[]" to have an empty list.*

Make sure to put a "/" before any commands on the list below or the list will not work properly.

Only add base commands; don't add any command arguments. (spaces)

```yaml
commandspy-command-blacklist:
  - "/blacklistedcommand"
```

### commandspy-command-whitelist

If use-command-whitelist is enabled, only commands that start with any of the words on the below list will be sent to players with commandspy permission.

*Set to "commandspy-command-whitelist: \[]" to have an empty list.*

Make sure to put a "/" before any commands on the list below or the list will not work properly.

Only add include base commands; don't add any command arguments. (spaces)

```yaml
commandspy-command-whitelist:
  - "/tell"
  - "/t"
  - "/msg"
  - "/w"
  - "/r"
  - "/whisper"
  - "/w"
  - "/pm"
```
