> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flumeirc.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat Commands

> Messaging and interaction commands

## /join

```
/join <channel> [key]
```

Join a channel. Provide a key for `+k` (key-protected) channels.

## /part

```
/part [channel] [message]
```

Leave a channel. Defaults to the active channel. The buffer is automatically closed.

## /msg

```
/msg <target> <text>
```

Send a private message to a user or channel.

## /me

```
/me <text>
```

Send an action (e.g., `/me waves`).

## /notice

```
/notice <target> <text>
```

Send a NOTICE to a user or channel.

## /nick

```
/nick <newnick>
```

Change your nickname.

## /away

```
/away [message]
```

Mark yourself as away. With no args, clears away status.

## /back

```
/back
```

Clear away status (alias for `/away` with no args).

## /topic

```
/topic [channel] [text]
```

View or set the channel topic.

## /whois

```
/whois <nick>
```

Query detailed info about a user. Shows nick, user\@host, realname, channels, server, idle time, and more.

If a PM buffer exists for the nick, whois output appears in that buffer instead of the server buffer — useful when chatting with someone and wanting to check their info.

### Auto-Whois on New PMs

Enable automatic whois when someone PMs you for the first time:

```
/set general.auto_whois_on_pm true
```

When enabled, the first PM from an unknown nick triggers a `/whois` and displays the results in the new PM buffer. Off by default.

## /oper

```
/oper <username> <password>
```

Authenticate as an IRC operator (requires a valid O:line on the server).

## /ctcp

CTCP requests and replies are displayed in the server buffer:

```
[ctcp] VERSION from alice
[ctcp] PING reply from bob: 2s
[ctcp] VERSION reply from alice: mIRC v7.72
```

PING replies show the round-trip latency instead of the raw timestamp.

## /quote

```
/quote <raw IRC line>
```

Send a raw IRC protocol line to the server.

## /color

```
/color <color> <text>
```

Send a message with colored text. Color can be a name (`red`, `blue`, `green`, etc.) or a mIRC number (0-15).

```
/color red Watch out!
/color 4 This is also red
/color lightblue Hello world
```

## /colors

```
/colors
```

Show all available color names and their previews.

## IRC Formatting Shortcuts

You can use formatting shortcuts anywhere in your messages:

| Shortcut      | Effect                        |
| ------------- | ----------------------------- |
| `%B`          | **Bold**                      |
| `%I`          | *Italic*                      |
| `%U`          | Underline                     |
| `%R`          | Reverse (swap fg/bg)          |
| `%O`          | Reset all formatting          |
| `%C<color>`   | Set foreground color          |
| `%C<fg>,<bg>` | Set foreground and background |

Colors can be names or numbers:

```
%Cred Hello %O           → red "Hello"
%C4 Hello %O             → red "Hello" (by number)
%Cblue,white text %O     → blue on white
%Bbold %Iand italic%O    → bold and italic
```

Use `%%` for a literal percent sign.

## Color Combos

Define reusable color shortcuts that you can use in any message with `%name%text%O` syntax.

### Built-in Combos

* `%rainbow%` — cycles through red, orange, yellow, green, cyan, blue, purple, pink

### Managing Combos

```
/color combo list
```

Show all defined combos.

```
/color combo add <name> <format>
```

Add a static combo using formatting shortcuts:

```
/color combo add alert %B%Cred,white
/color combo add info %Ccyan
/color combo add fire %B%Corange,red
```

```
/color combo add <name> cycle <color1> <color2> ...
```

Add a cycling combo that applies a different color to each character:

```
/color combo add pride cycle red orange yellow green blue purple
/color combo add usa cycle red white blue
```

```
/color combo remove <name>
```

Remove a combo.

```
/color combo test <name> <text>
```

Preview a combo without sending a message.

### Using Combos

Use `%name%` in any message to apply the combo, and `%O` to reset:

```
%rainbow%Hello world!%O
%alert%WARNING:%O server restarting
```

### Config File

Combos are saved to `config.toml` via `/save`:

```toml theme={null}
[combos]
alert = "%B%Cred,white"
info = "%Ccyan"

[combos.rainbow]
type = "cycle"
colors = ["red", "orange", "yellow", "green", "cyan", "blue", "purple", "pink"]
```

## /alias

```
/alias [name] [command]
```

Create command aliases — shortcuts that expand to longer commands.

```
/alias ns /msg nickserv@services.network.net
/alias cs /msg chanserv@services.network.net
/alias wc /close
```

Then `/ns identify mypassword` expands to `/msg nickserv@services.network.net identify mypassword`.

```
/alias                — list all aliases
/alias remove <name>  — remove an alias
```

### Argument Placement with `$*`

By default, alias arguments are appended after the expansion with a space. For more control over where arguments go, use `$*`:

```
/alias chatops /quote chatops :$*
```

Then `/chatops server is being updated` expands to `/quote chatops :server is being updated` — the colon sits directly against the text with no extra space, which some IRC commands require.

Aliases are persisted via `/save` as an `[aliases]` section in `config.toml`:

```toml theme={null}
[aliases]
ns = "/msg nickserv@services.network.net"
cs = "/msg chanserv@services.network.net"
```

## /mouse

```
/mouse [enable|disable]
```

Toggle mouse support. When enabled:

* **Click** buffer names in the sidebar to switch
* **Scroll wheel** in the chat area to scroll history

Mouse is off by default. Persisted via `/save` or `ui.mouse = true` in `config.toml`.

## /quit

```
/quit [message]
```

Disconnect and exit Flume.
