The PART
command indicates that the client wants to leave one or more channels. In response, the server sends one or more PART
message to indicate that the request was successful.
PART <channel>{,<channel>} [<reason>]
<channel>
: Name of the channel(s) to join, separated by commas.<reason>
: Optional reason which is shown to the other users in the channel.
A PART
message sent from the server indicates that someone has left a channel. In this case, the <prefix>
is the user that’s left. If a user’s PART
command is successful, they receive one of these messages. In addition, all other clients in the channel also receive a PART
message. For example, if dan
and alice
are on channel #irctoast
, and dan
parts, both of them will receive a PART
message indicating that dan
has left the channel. The examples illustrate this in action.
The channels are processed in order. If the channel exists and the user is joined to it, they are parted from the channel and send an appropriate PART
message. If the channel exists and the user isn’t joined to it, they are sent an ERR_NOTONCHANNEL
reply and the server continues with the next channel. If the channel doesn’t exist the user gets sent an ERR_NOSUCHCHANNEL
reply and the server continues.
Some servers only use the <reason>
after the client’s been connected for a certain amount of time, to help prevent spam.
Examples
C -> PART #irctest
S <- :d!d@localhost PART #irctest
Parting with no reason
C -> part #irctest :I'm joined to too many channels already
S <- :alice!a@localhost PART #irctest :I'm joined to too many channels already
Parting with a reason
C -> PART #ircv3
S <- :irc.example.com 442 alice #ircv3 :You're not on that channel
Parting a channel you’re not joined to
C -> JOIN #alpha
S <- :patty!p@localhost JOIN :#alpha
S <- :irc.example.com 353 patty = #alpha :@patty
S <- :irc.example.com 366 patty #alpha :End of /NAMES list.
C -> JOIN #charlie
S <- :patty!p@localhost JOIN :#charlie
S <- :irc.example.com 353 patty = #charlie :@patty
S <- :irc.example.com 366 patty #charlie :End of /NAMES list.
C -> part #alpha,#beta,#charlie
S <- :patty!p@localhost PART #alpha
S <- :irc.example.com 403 patty #beta :No such channel
S <- :patty!p@localhost PART #charlie
Parting two real channels, and a non-existent channel
C -> part #alpha,#charlie
S <- :patty!p@localhost PART #alpha
S <- :patty!p@localhost PART #charlie
Parting two real channels
C -> JOIN #irctoast
S <- :dan!d@localhost JOIN :#irctoast
S <- :irc.example.com 353 dan = #irctoast :dan @alice
S <- :irc.example.com 366 dan #irctoast :End of /NAMES list.
S <- :alice!a@localhost PART #irctoast :Heading off!
Seeing someone else part a channel
Compatibility
Related Numerics
ERR_NOSUCHCHANNEL (403)
ERR_NOTONCHANNEL (442)
You can edit and contribute changes to this page on GitHub here.