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?
Best way to retrieve the IP of a newly connecting user?
Moderator: Supporters
You have to ask the server for it by a adding NICKIP to your PROTOCTL.I have not seen an IP field in the NICK message
Quote from doc/technical/protoctl.txt:
Code: Select all
NICKIP This token indicates that a (standard) base64 encoded IP address is included
in the NICK command. The IP is in binary network byte order formated and
encoded using the standard base64 algorithm. '*' is used if no IP is available.
PS: NICKIP was introduced in Unreal3.2.1