Note that this message accepts a special argument ("0"), which is
a special request to leave all channels the user is currently a member
of. The server will process this message as if the user had sent
a PART command (See Section 3.2.2) for each channel he is a member
of.
Examples:
JOIN #foobar ; Command to join channel #foobar.
JOIN &foo fubar ; Command to join channel &foo using
key "fubar".
JOIN #foo,&bar fubar ; Command to join channel #foo using
key "fubar" and &bar using no key.
JOIN #foo,#bar fubar,foobar ; Command to join channel #foo using
key "fubar", and channel #bar using
key "foobar".
JOIN #foo,#bar ; Command to join channels #foo and
This is on the Manual: https://datatracker.ietf.org/doc/html/rfc2812#section-3.2.1
Note that this message accepts a special argument ("0"), which is a special request to leave all channels the user is currently a member of. The server will process this message as if the user had sent a PART command (See Section 3.2.2) for each channel he is a member of.
Examples:
JOIN #foobar ; Command to join channel #foobar.
JOIN &foo fubar ; Command to join channel &foo using key "fubar". JOIN #foo,&bar fubar ; Command to join channel #foo using key "fubar" and &bar using no key.
JOIN #foo,#bar fubar,foobar ; Command to join channel #foo using key "fubar", and channel #bar using key "foobar".
JOIN #foo,#bar ; Command to join channels #foo and
bar.
JOIN 0 ; Leave all currently joined channels.