But it turns out after manually removing the line break in the channel list from the config file, all channels are connected again.
I am sure I never edited or even viewed the config file
So there was a line break in the channel list. Maybe I inserted it somehow in the config dialog.
This would be a improvement for XChat, to not accept line breaks in the config dialog where they do not make sense.
I remember I cut out the channel list from the config dialog window, edited the channels in an editor and pasted it back. Maybe the editor inserted a line break and I did not notice it.