If the network you're on uses Unreal as IRCd (/version) you can ban people pre-emptively by realname with +b ~r:realname_here (see
unreal ban types).
You cannot actively check someone's realname upon them joining the channel unless you /whois every person on-join.