Problem is you can't see the IP of a user without them showing it to you - unless you're on IRCop. If You're just trying to find the location of a user by their IP, i think there's already a script released on Hawkee to do just that, try searching - else drop a comment and i'll see what i can do.
This is for networks like DALnet, ones that don't provide native hostmasking for user's. Unfortunately, these are rife with skids.