Parts all channels you are on.
You can specify a message that will be shown if chanmode +u isn't set.
/partall Parting all channels
Will let you part all channels with the message 'Parting all channels'.
You can part a specific channel with /part