Ok. What you mean is acquire the ip address in one of the above described methods and store the avatar name and ip address in a MySQL database. The MySQL database is just the storage. Right?
(I thought you had discovered a new way of getting an IP address).
There is a valid use of an ip address by the way, banning griefers. I know an ip address can be changed and more than one avatar can be on the same ip address. Still it is a way to hinder the pest activities of a griefer to a point that he/she might give up. I know, wishful thinking ;-)