Best way to retrieve the IP of a newly connecting user?
Posted: Sun Aug 21, 2005 2:52 pm
Hello,
at the moment I am rewriting the base of my services on a large scale. I am also implementing IPv6 support and would require ip addresses to be retrieved, for different purposes like Proxy scanning. At the moment, an asynchronous resolver takes care of turning real hosts into ips. This will cause problems with ipv6 ips though (is the user connected via v6 or v4?) and it generally makes no sence to perform two lookups. My question now is, what is the most elegant solution to this problem? I have not seen an IP field in the NICK message - but ircops get the ip of a user in a whois query. Of course I could do a whois query on each new connecting user. Is this the best way to go?
at the moment I am rewriting the base of my services on a large scale. I am also implementing IPv6 support and would require ip addresses to be retrieved, for different purposes like Proxy scanning. At the moment, an asynchronous resolver takes care of turning real hosts into ips. This will cause problems with ipv6 ips though (is the user connected via v6 or v4?) and it generally makes no sence to perform two lookups. My question now is, what is the most elegant solution to this problem? I have not seen an IP field in the NICK message - but ircops get the ip of a user in a whois query. Of course I could do a whois query on each new connecting user. Is this the best way to go?