As I mentioned, just use some form of $address. Using hash tables isn't a bad idea... it just won't solve the issue you mentioned because as long as you use $nick, you won't know if it's a changed nick no matter what method you use. $address in either hash tables or INI files will let you prevent much of that if it matters in the script.