Channel Commands
Join one or more channels.
Syntax: JOIN <channel>[,<channel2>,...] [<key>[,<key2>,...]]
Behavior:
- If the channel doesn’t exist, it is created and you become the first operator (
+o) - You can join multiple channels in one command separated by commas
- If a channel requires a key (
+k), provide it as the second parameter - The server sends: JOIN message → MODE (if you got +o) → TOPIC (or 332/331) → NAMES list (353/366)
Channel join restrictions (checked in order):
- User per-prefix channel limit exceeded →
ERR_TOOMANYCHANNELS - You are banned (
+b) and not excepted (+e) →ERR_BANNEDFROMCHAN - Channel is invite-only (
+i) and you have no invite or invex (+I) →ERR_INVITEONLYCHAN - Channel is registered-only (
+R) and you’re not registered →ERR_NEEDREGGEDNICK - Channel is secure-only (
+z) and you’re not on TLS →ERR_SECUREONLYCHAN - Wrong key (
+k) →ERR_BADCHANNELKEY - Channel is full (
+l) →ERR_CHANNELISFULL - Join throttle exceeded (
+j) →ERR_NEEDREGGEDNICK(rate exceeded) - Channel is oper-only (
+O) and you’re not an IRC op →ERR_IRCOPERONLYCHAN
Examples:
JOIN #generalJOIN #secret secretkeyJOIN #chan1,#chan2,#chan3JOIN #secret,#other key1,Leave one or more channels.
Syntax: PART <channel>[,<channel2>,...] [:<message>]
Behavior:
- Broadcasts your departure to all channel members
- The part message is optional
Examples:
PART #generalPART #general :Leaving for nowPART #chan1,#chan2Set or unset modes on a channel or user.
Syntax (channel): MODE <channel> [+/-modes] [mode arguments...]
Syntax (user): MODE <nick> [+/-modes]
Behavior:
- Without arguments: returns current modes of the channel or user
- With arguments: applies the specified mode changes
- Multiple modes can be changed in one command (up to
max_modes_per_command, default: 20)
Channel mode examples:
MODE #channel +m # Set moderatedMODE #channel +k secret # Set channel keyMODE #channel +o Alice # Give Alice operatorMODE #channel +v Bob # Give Bob voiceMODE #channel +b *!*@spammer.net # Ban maskMODE #channel -k # Remove channel keyMODE #channel +im # Set invite-only and moderatedMODE #channel +j 5:60 # Join throttle: 5 joins per 60 secondsMODE #channel +d 30 # 30-second delay for new users to speakUser mode examples:
MODE yournick +i # Set invisibleMODE yournick +x # Enable hostname cloakingMODE yournick -i # Remove invisibleListing modes:
MODE #channel +b # List bansMODE #channel +e # List ban exceptionsMODE #channel +I # List invite exceptionsErrors:
482 ERR_CHANOPRIVSNEEDED— not a channel operator481 ERR_NOPRIVILEGES— setting operator-only modes without being an IRC op472 ERR_UNKNOWNMODE— unknown mode character
See Modes for the complete mode reference.
Get or set the topic of a channel.
Syntax: TOPIC <channel> [:<new topic>]
Without topic argument: Returns the current topic (332) or “no topic” (331).
With topic argument: Sets a new topic.
- Restricted to channel operators if
+tis set - Channel operators can always change the topic regardless of
+t
Constraints:
- Maximum topic length: 300 characters
Examples:
TOPIC #general # View current topicTOPIC #general :Welcome to our channel!TOPIC #general : # Clear the topicList all visible users in a channel.
Syntax: NAMES [<channel>]
Behavior:
- Returns a
353 RPL_NAMREPLYwith nicks prefixed by their status symbol (@for op,+for voice) - If
UHNAMEScapability is enabled, nicks are shown asnick!ident@host - If
MULTI-PREFIXcapability is enabled, users with multiple modes show all prefixes (e.g.,@+nick) - Without a channel argument, lists all visible users on the server
Example response:
:server 353 you = #general :@Alice +Bob Carol Dave:server 366 you #general :End of NAMES list.List channels and their topics.
Syntax: LIST [<channel>[,<channel2>,...]]
Behavior:
- Returns a list of channels with user count and topic
- Channels with
+s(Secret) or+p(Private) modes are hidden from LIST - With channel argument(s): shows info for those specific channels only
Example:
LISTLIST #general,#helpINVITE
Section titled “INVITE”Invite a user to a channel.
Syntax: INVITE <nick> <channel>
Behavior:
- Must be a channel operator to invite to
+ichannels - The invited user receives a
INVITEmessage - The invite is tracked and allows the user to join even if the channel is
+i - If
INVITE-NOTIFYcapability is enabled, other channel members are notified of the invite - If
INVITE-EXTENDEDcapability is enabled, the invite message includes account information
Examples:
INVITE Alice #secretEject a user from a channel.
Syntax: KICK <channel> <nick> [:<reason>]
Behavior:
- Requires channel operator status
- The kicked user receives a KICK message and is removed from the channel
- The kicked user can rejoin unless they are also banned
Constraints:
- Maximum kick message length: 255 characters
Examples:
KICK #general BobKICK #general Bob :Spamming