Actually, delthas pointed out an issue with this patch: this isn't
strictly RFC-compliant when joining some channels without a key. The
RFC says we should put the channels with a key first like so:
JOIN #foo,&bar fubar ; join channel #foo using key "fubar"
and &bar using no key.
This would only matter if a server errors out when we provide an empty
key to join a channel without a key.