Without reading too far into that blob of really obtuse code, my guess is that the script simply does not support ipv6 addresses. It seems like it's checking for a '.' in the address to see if it should dns a nickname or an address, which ipv6 won't give you. I could be reading it wrong though. Either way, you should check for a later version of the script, since you are unlikely to get tech support for third party scripts here (you can certainly try in the Scripts & Popups forum though!)