That sucks, and the channel or network should do something about it.
IRC is how I was friends with many trans people, before we knew the word trans.
It makes sense: it was much easier to pass online. So you could just hang out and talk about programming or whatever, and no one cared what plumbing you were born with.
Of course, there were always some people being antisocial on IRC, and that's why there were channel ops, war scripts, and IRCops.
I think I recall one or two occasions when someone attacked a channel I was on, and then later came back and reconciled. There should be more of the learning to play nice with others, but less toxic to start with.