You can use the "getchanhost" command provided by Tcl, to obtain the userhost of a user.
Simply using "[lindex [split [getchanhost $user $chan] @] 1]" (off the top of my head, and with imaginary variables), should get the hostname the user has on IRC.
You can use DNS functions then, to obtain and IP or host, depending on your needs.