You make a good point about IP addresses but in the end if someone wants to hide or change their location all they have to use is a proxy server located in the country they want.
It's not easy to find ip addresses when chatting since, with most chat programs (Yahoo, MSN, etc..) you actually connect to the chatting servers and all information passes through them instead of directly connecting to the person you are actually chatting with.
You probably already know this but if you do find the ip address of the person you are chatting with you can use web sites like this:
http://whatismyipaddress.com/
to find the location of the person.