> For the complete documentation index, see [llms.txt](https://hane-mod-studio.gitbook.io/hane-mod-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hane-mod-studio.gitbook.io/hane-mod-studio/hane-scripts/hane-radio/admin-commands.md).

# Admin Commands

Hane Radio includes a built-in admin panel accessible through both the radio UI and chat commands.

***

### Admin Access

Configure admin access in `config/config.lua`:

```lua
Config.Admin = {
    Enabled = true,
    UseAce = false,
    AcePermission = 'hane_radio.admin',
    DiscordIDs = {
        '123456789012345678',
    }
}
```

**Two authentication methods:**

* **Discord ID** (`UseAce = false`): Add Discord IDs to the `DiscordIDs` table.
* **ACE Permission** (`UseAce = true`): Grant the `hane_radio.admin` ACE permission.

ACE example in `server.cfg`:

```cfg
add_ace group.admin hane_radio.admin allow
```

***

### Chat Commands

All commands are registered via `ox_lib` command system.

#### `/radioinfo`

Displays active channel and user count.

```
/radioinfo
→ Active Channels: 5 | Active Users: 23
```

***

#### `/radiokick [id] [frequency]`

Kick a player from a specific radio channel.

```
/radiokick 5 1.00
→ Kicks player ID 5 from frequency 1.00
```

| Parameter   | Type   | Description       |
| ----------- | ------ | ----------------- |
| `id`        | number | Target player ID  |
| `frequency` | number | Channel frequency |

***

#### `/radioban [id]`

Ban a player from using the radio system entirely.

```
/radioban 5
→ Bans player ID 5 from all radio features
```

| Parameter | Type   | Description      |
| --------- | ------ | ---------------- |
| `id`      | number | Target player ID |

***

#### `/radiounban [identifier]`

Unban a previously banned player by their license identifier.

```
/radiounban license:abc123def456
→ Unbans the player with that identifier
```

| Parameter    | Type   | Description                 |
| ------------ | ------ | --------------------------- |
| `identifier` | string | Player's license identifier |

***

#### `/radioannounce [message]`

Send a global announcement to all active radio users across all frequencies.

```
/radioannounce Server maintenance in 10 minutes
→ Broadcasts to all radio users
```

| Parameter | Type   | Description       |
| --------- | ------ | ----------------- |
| `message` | string | Announcement text |

***

### In-Radio Admin Panel

Admins can also use the radio UI's built-in admin panel to:

* **Kick users** from specific channels
* **Ban/Unban users** from the radio system
* **Listen to channels** silently (join without being visible)
* **Send global announcements** to all frequencies

***

### Webhook Logging

All admin actions are logged to Discord when webhook logging is enabled:

```lua
Config.Webhook = {
    Enabled = true,
    URL = 'https://discord.com/api/webhooks/...',
}
```

Logged events include: channel joins/leaves, emergency signals, text messages, admin kicks/bans, and global announcements.
