The only thing mapaddress does is translate an IP address into an onion domain. It's useful when programs don't know how to handle pseudo-TLDs and stuff. So the IRC client knows what an IP address is, it sends it to Tor's socks port, and Tor translates it to the onion domain and does what it normally does to connect to hidden services.